<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Repetier-Firmware: src/ArduinoAVR/Repetier/SdFat.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="repetier-logo-trans128.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">0.91</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_sd_fat_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">src/ArduinoAVR/Repetier/SdFat.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_sd_fat_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Arduino SdFat Library</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2012 by William Greiman</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This file is part of the Arduino SdFat Library</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This Library is free software: you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment"> * (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * This Library is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with the Arduino SdFat Library.  If not, see</span>
<a name="l00018"></a>00018 <span class="comment"> * &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 <span class="comment">/* Arduino SdFat Library</span>
<a name="l00021"></a>00021 <span class="comment"> * Copyright (C) 2012 by William Greiman</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> * This file is part of the Arduino SdFat Library</span>
<a name="l00024"></a>00024 <span class="comment"> *</span>
<a name="l00025"></a>00025 <span class="comment"> * This Library is free software: you can redistribute it and/or modify</span>
<a name="l00026"></a>00026 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00027"></a>00027 <span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00028"></a>00028 <span class="comment"> * (at your option) any later version.</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> * This Library is distributed in the hope that it will be useful,</span>
<a name="l00031"></a>00031 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00032"></a>00032 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00033"></a>00033 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00034"></a>00034 <span class="comment"> *</span>
<a name="l00035"></a>00035 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00036"></a>00036 <span class="comment"> * along with the Arduino SdFat Library.  If not, see</span>
<a name="l00037"></a>00037 <span class="comment"> * &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00038"></a>00038 <span class="comment"> */</span>
<a name="l00039"></a>00039 
<a name="l00247"></a>00247 <span class="preprocessor">#ifndef SdFat_h</span>
<a name="l00248"></a>00248 <span class="preprocessor"></span><span class="preprocessor">#define SdFat_h</span>
<a name="l00249"></a>00249 <span class="preprocessor"></span>
<a name="l00253"></a>00253 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00255"></a><a class="code" href="_sd_fat_8h.html#aca25ecce379f446043bdee2c55304210">00255</a> <span class="comment"></span><span class="preprocessor">#define SD_FAT_VERSION 20130629</span>
<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00258"></a>00258 <span class="comment"></span><span class="preprocessor">#if !defined(ARDUINO) || ARDUINO &lt; 100</span>
<a name="l00259"></a>00259 <span class="preprocessor"></span><span class="preprocessor">#error Arduino IDE must be 1.0 or greater</span>
<a name="l00260"></a>00260 <span class="preprocessor"></span><span class="preprocessor">#endif  // ARDUINO &lt; 100</span>
<a name="l00261"></a>00261 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00262"></a>00262 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00263"></a>00263 <span class="comment">// Based on the document:</span>
<a name="l00264"></a>00264 <span class="comment">//</span>
<a name="l00265"></a>00265 <span class="comment">// SD Specifications</span>
<a name="l00266"></a>00266 <span class="comment">// Part 1</span>
<a name="l00267"></a>00267 <span class="comment">// Physical Layer</span>
<a name="l00268"></a>00268 <span class="comment">// Simplified Specification</span>
<a name="l00269"></a>00269 <span class="comment">// Version 3.01</span>
<a name="l00270"></a>00270 <span class="comment">// May 18, 2010</span>
<a name="l00271"></a>00271 <span class="comment">//</span>
<a name="l00272"></a>00272 <span class="comment">// http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs</span>
<a name="l00273"></a>00273 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00274"></a>00274 <span class="comment">// SD card commands</span>
<a name="l00276"></a><a class="code" href="_sd_fat_8h.html#a1ec3c92c9dd38b0efa9126be38850d29">00276</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a1ec3c92c9dd38b0efa9126be38850d29">CMD0</a> = 0X00;
<a name="l00278"></a><a class="code" href="_sd_fat_8h.html#a5555048921d7792941f6cde88d5c8e36">00278</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5555048921d7792941f6cde88d5c8e36">CMD8</a> = 0X08;
<a name="l00280"></a><a class="code" href="_sd_fat_8h.html#afdee4fb07dae3bf93f0e9a0d9987143e">00280</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#afdee4fb07dae3bf93f0e9a0d9987143e">CMD9</a> = 0X09;
<a name="l00282"></a><a class="code" href="_sd_fat_8h.html#a7228ab7c6f05aac53cf844e8e4a9a121">00282</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a7228ab7c6f05aac53cf844e8e4a9a121">CMD10</a> = 0X0A;
<a name="l00284"></a><a class="code" href="_sd_fat_8h.html#a5aceb9f83aec1d7d6d695ef0bc22b39c">00284</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5aceb9f83aec1d7d6d695ef0bc22b39c">CMD12</a> = 0X0C;
<a name="l00286"></a><a class="code" href="_sd_fat_8h.html#a0a4b464ebac5e07eb233da545ff29259">00286</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a0a4b464ebac5e07eb233da545ff29259">CMD13</a> = 0X0D;
<a name="l00288"></a><a class="code" href="_sd_fat_8h.html#ab5e57c3b26526169eb6f2150a23adfe4">00288</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ab5e57c3b26526169eb6f2150a23adfe4">CMD17</a> = 0X11;
<a name="l00290"></a><a class="code" href="_sd_fat_8h.html#a411a50a6bdd19b71c57c8df91cfde253">00290</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a411a50a6bdd19b71c57c8df91cfde253">CMD18</a> = 0X12;
<a name="l00292"></a><a class="code" href="_sd_fat_8h.html#ae0b9ab3c62fefc845e22834eb7f6abdd">00292</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ae0b9ab3c62fefc845e22834eb7f6abdd">CMD24</a> = 0X18;
<a name="l00294"></a><a class="code" href="_sd_fat_8h.html#ac93a7f0b1843211d8fb003038c1db20f">00294</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac93a7f0b1843211d8fb003038c1db20f">CMD25</a> = 0X19;
<a name="l00296"></a><a class="code" href="_sd_fat_8h.html#a120c7957c30e8c619360c7bab8ba0e58">00296</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a120c7957c30e8c619360c7bab8ba0e58">CMD32</a> = 0X20;
<a name="l00299"></a><a class="code" href="_sd_fat_8h.html#aa6202b0708714b643336fcf4d3036e23">00299</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#aa6202b0708714b643336fcf4d3036e23">CMD33</a> = 0X21;
<a name="l00301"></a><a class="code" href="_sd_fat_8h.html#aa5e07e08a8cccb47d966cff9d19f5f12">00301</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#aa5e07e08a8cccb47d966cff9d19f5f12">CMD38</a> = 0X26;
<a name="l00303"></a><a class="code" href="_sd_fat_8h.html#a6e3cb1cf62a815db82fe9f343a4cb1a4">00303</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a6e3cb1cf62a815db82fe9f343a4cb1a4">CMD55</a> = 0X37;
<a name="l00305"></a><a class="code" href="_sd_fat_8h.html#a65360b0848046db96c7a3a38ea77b027">00305</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a65360b0848046db96c7a3a38ea77b027">CMD58</a> = 0X3A;
<a name="l00307"></a><a class="code" href="_sd_fat_8h.html#a87cd0b798025b0187c44f11cd52feb43">00307</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a87cd0b798025b0187c44f11cd52feb43">CMD59</a> = 0X3B;
<a name="l00310"></a><a class="code" href="_sd_fat_8h.html#a4427a8b94a0a6092255388a8666c42eb">00310</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a4427a8b94a0a6092255388a8666c42eb">ACMD23</a> = 0X17;
<a name="l00313"></a><a class="code" href="_sd_fat_8h.html#a3d9453bff2059b4175f09e82220d5dc5">00313</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a3d9453bff2059b4175f09e82220d5dc5">ACMD41</a> = 0X29;
<a name="l00314"></a>00314 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00316"></a><a class="code" href="_sd_fat_8h.html#abd9bae6aca26cbe7e75dac573bb98ed9">00316</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#abd9bae6aca26cbe7e75dac573bb98ed9">R1_READY_STATE</a> = 0X00;
<a name="l00318"></a><a class="code" href="_sd_fat_8h.html#a180d34bf6496bc49f34e750d3878c528">00318</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a180d34bf6496bc49f34e750d3878c528">R1_IDLE_STATE</a> = 0X01;
<a name="l00320"></a><a class="code" href="_sd_fat_8h.html#a0299085ef0457c2d8714c838beaead80">00320</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a0299085ef0457c2d8714c838beaead80">R1_ILLEGAL_COMMAND</a> = 0X04;
<a name="l00322"></a><a class="code" href="_sd_fat_8h.html#a266235d83a613a26790bf21cc5e643e7">00322</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a266235d83a613a26790bf21cc5e643e7">DATA_START_BLOCK</a> = 0XFE;
<a name="l00324"></a><a class="code" href="_sd_fat_8h.html#a22cd4350449d8c6e4ed71ddaa86d4482">00324</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a22cd4350449d8c6e4ed71ddaa86d4482">STOP_TRAN_TOKEN</a> = 0XFD;
<a name="l00326"></a><a class="code" href="_sd_fat_8h.html#a55a97e38f040eaef5ea72c04ed0b8ca3">00326</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a55a97e38f040eaef5ea72c04ed0b8ca3">WRITE_MULTIPLE_TOKEN</a> = 0XFC;
<a name="l00328"></a><a class="code" href="_sd_fat_8h.html#ae8f749cad9dfa06c4a44435bac117183">00328</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ae8f749cad9dfa06c4a44435bac117183">DATA_RES_MASK</a> = 0X1F;
<a name="l00330"></a><a class="code" href="_sd_fat_8h.html#a0fbc8534d6683fea65b463f439df1c3d">00330</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a0fbc8534d6683fea65b463f439df1c3d">DATA_RES_ACCEPTED</a> = 0X05;
<a name="l00331"></a>00331 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00333"></a><a class="code" href="struct_c_i_d.html">00333</a> <span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_c_i_d.html">CID</a> {
<a name="l00334"></a>00334   <span class="comment">// byte 0</span>
<a name="l00336"></a><a class="code" href="struct_c_i_d.html#ae7e18f9a317db7063e35ef5a5d4bd5f7">00336</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#ae7e18f9a317db7063e35ef5a5d4bd5f7">mid</a>;
<a name="l00337"></a>00337   <span class="comment">// byte 1-2</span>
<a name="l00339"></a><a class="code" href="struct_c_i_d.html#a0e7c3c74464b5888d6e4dde057c4d2c9">00339</a> <span class="comment"></span>  <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a0e7c3c74464b5888d6e4dde057c4d2c9">oid</a>[2];
<a name="l00340"></a>00340   <span class="comment">// byte 3-7</span>
<a name="l00342"></a><a class="code" href="struct_c_i_d.html#a44c58f891140614a2a6a1ad573ca0bf3">00342</a> <span class="comment"></span>  <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a44c58f891140614a2a6a1ad573ca0bf3">pnm</a>[5];
<a name="l00343"></a>00343   <span class="comment">// byte 8</span>
<a name="l00345"></a><a class="code" href="struct_c_i_d.html#a4db87c2ec4c352612dcf8cedf9986d8e">00345</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a4db87c2ec4c352612dcf8cedf9986d8e">prv_m</a> : 4;
<a name="l00347"></a><a class="code" href="struct_c_i_d.html#a1cb6a1abc2649d20b1f2e57dd1763997">00347</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a1cb6a1abc2649d20b1f2e57dd1763997">prv_n</a> : 4;
<a name="l00348"></a>00348   <span class="comment">// byte 9-12</span>
<a name="l00350"></a><a class="code" href="struct_c_i_d.html#ab39d64e654c57f0bc30ce636e071713a">00350</a> <span class="comment"></span>  uint32_t <a class="code" href="struct_c_i_d.html#ab39d64e654c57f0bc30ce636e071713a">psn</a>;
<a name="l00351"></a>00351   <span class="comment">// byte 13</span>
<a name="l00353"></a><a class="code" href="struct_c_i_d.html#a5e4772a445bb5e242f62d89ed9fa01bb">00353</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a5e4772a445bb5e242f62d89ed9fa01bb">mdt_year_high</a> : 4;
<a name="l00355"></a><a class="code" href="struct_c_i_d.html#ad828f5fe7507f2e5a9df0da7a74b59e8">00355</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#ad828f5fe7507f2e5a9df0da7a74b59e8">reserved</a> : 4;
<a name="l00356"></a>00356   <span class="comment">// byte 14</span>
<a name="l00358"></a><a class="code" href="struct_c_i_d.html#a6f31f0414d7c277a8f3ac4a8e7a83101">00358</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#a6f31f0414d7c277a8f3ac4a8e7a83101">mdt_month</a> : 4;
<a name="l00360"></a><a class="code" href="struct_c_i_d.html#aaf6f6e0f7e73844d7d2a59b3e7f3b6de">00360</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#aaf6f6e0f7e73844d7d2a59b3e7f3b6de">mdt_year_low</a> :4;
<a name="l00361"></a>00361   <span class="comment">// byte 15</span>
<a name="l00363"></a><a class="code" href="struct_c_i_d.html#af3bbe76c61e108c500f5a861dff1e6c2">00363</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#af3bbe76c61e108c500f5a861dff1e6c2">always1</a> : 1;
<a name="l00365"></a><a class="code" href="struct_c_i_d.html#aa7963a1d695d609cf3609747cf19fd71">00365</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_i_d.html#aa7963a1d695d609cf3609747cf19fd71">crc</a> : 7;
<a name="l00366"></a>00366 }<a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((packed)) cid_t;
<a name="l00367"></a>00367 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00369"></a><a class="code" href="_sd_fat_8h.html#ae7e18f9a317db7063e35ef5a5d4bd5f7">00369</a> <span class="comment"></span>typedef struct <a class="code" href="struct_c_s_d_v1.html">CSDV1</a> {
<a name="l00370"></a>00370   <span class="comment">// byte 0</span>
<a name="l00371"></a><a class="code" href="struct_c_s_d_v1.html#affe215a7220b2d52fb9dacf3b35e56dc">00371</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#affe215a7220b2d52fb9dacf3b35e56dc">reserved1</a> : 6;
<a name="l00372"></a><a class="code" href="_sd_fat_8h.html#a0e7c3c74464b5888d6e4dde057c4d2c9">00372</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a468f68d66a14a0e3d70ae9dce7c7b084">csd_ver</a> : 2;
<a name="l00373"></a>00373   <span class="comment">// byte 1</span>
<a name="l00374"></a><a class="code" href="struct_c_s_d_v1.html#add15a5302761bd6e2ee294c0c38e9f8a">00374</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_s_d_v1.html#add15a5302761bd6e2ee294c0c38e9f8a">taac</a>;
<a name="l00375"></a><a class="code" href="_sd_fat_8h.html#a44c58f891140614a2a6a1ad573ca0bf3">00375</a>   <span class="comment">// byte 2</span>
<a name="l00376"></a><a class="code" href="struct_c_s_d_v1.html#a877524d1f9ede3c07079957826d08a1e">00376</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_s_d_v1.html#a877524d1f9ede3c07079957826d08a1e">nsac</a>;
<a name="l00377"></a>00377   <span class="comment">// byte 3</span>
<a name="l00378"></a><a class="code" href="_sd_fat_8h.html#a4db87c2ec4c352612dcf8cedf9986d8e">00378</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af83be4d825b2e325d094297e81693443">tran_speed</a>;
<a name="l00379"></a>00379   <span class="comment">// byte 4</span>
<a name="l00380"></a><a class="code" href="_sd_fat_8h.html#a1cb6a1abc2649d20b1f2e57dd1763997">00380</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a76b00b1b0657aefa115a98f122aca8c5">ccc_high</a>;
<a name="l00381"></a>00381   <span class="comment">// byte 5</span>
<a name="l00382"></a><a class="code" href="struct_c_s_d_v1.html#af43ab7cd256a4134cd3b78bdecb9d7c5">00382</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af43ab7cd256a4134cd3b78bdecb9d7c5">read_bl_len</a> : 4;
<a name="l00383"></a><a class="code" href="_sd_fat_8h.html#ab39d64e654c57f0bc30ce636e071713a">00383</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ad38ba451d9647c41a9b60a2f7a61e9d4">ccc_low</a> : 4;
<a name="l00384"></a>00384   <span class="comment">// byte 6</span>
<a name="l00385"></a><a class="code" href="struct_c_s_d_v1.html#a8ca62fc4ed0f6598005209d3c34f9c44">00385</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a8ca62fc4ed0f6598005209d3c34f9c44">c_size_high</a> : 2;
<a name="l00386"></a><a class="code" href="_sd_fat_8h.html#a5e4772a445bb5e242f62d89ed9fa01bb">00386</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#add22350e7fe29ca6649dd6564e8425ea">reserved2</a> : 2;
<a name="l00387"></a><a class="code" href="struct_c_s_d_v1.html#adca766448ce5830490363d3fbb02ab4b">00387</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#adca766448ce5830490363d3fbb02ab4b">dsr_imp</a> : 1;
<a name="l00388"></a><a class="code" href="_sd_fat_8h.html#ad828f5fe7507f2e5a9df0da7a74b59e8">00388</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a31c0f3174289d3fb8abade294770fc33">read_blk_misalign</a> :1;
<a name="l00389"></a><a class="code" href="struct_c_s_d_v1.html#a5fd0cab21c874fd49fc4ea5d537be201">00389</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a5fd0cab21c874fd49fc4ea5d537be201">write_blk_misalign</a> : 1;
<a name="l00390"></a><a class="code" href="struct_c_s_d_v1.html#a7387a4ab3ec1161c246ed02941e1325e">00390</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a7387a4ab3ec1161c246ed02941e1325e">read_bl_partial</a> : 1;
<a name="l00391"></a><a class="code" href="_sd_fat_8h.html#a6f31f0414d7c277a8f3ac4a8e7a83101">00391</a>   <span class="comment">// byte 7</span>
<a name="l00392"></a><a class="code" href="struct_c_s_d_v1.html#a8cd3e8cdbf34be110b1d87b0c5f7b1d8">00392</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_s_d_v1.html#a8cd3e8cdbf34be110b1d87b0c5f7b1d8">c_size_mid</a>;
<a name="l00393"></a><a class="code" href="_sd_fat_8h.html#aaf6f6e0f7e73844d7d2a59b3e7f3b6de">00393</a>   <span class="comment">// byte 8</span>
<a name="l00394"></a><a class="code" href="struct_c_s_d_v1.html#a68aafd29ea70955c274ebeb0364b4033">00394</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a68aafd29ea70955c274ebeb0364b4033">vdd_r_curr_max</a> : 3;
<a name="l00395"></a><a class="code" href="struct_c_s_d_v1.html#a0e5dbcfa1434c0d43a5f71067b54377a">00395</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a0e5dbcfa1434c0d43a5f71067b54377a">vdd_r_curr_min</a> : 3;
<a name="l00396"></a><a class="code" href="_sd_fat_8h.html#af3bbe76c61e108c500f5a861dff1e6c2">00396</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a2af914ea8fe2b045432553e2d7c75bb7">c_size_low</a> :2;
<a name="l00397"></a>00397   <span class="comment">// byte 9</span>
<a name="l00398"></a><a class="code" href="_sd_fat_8h.html#aa7963a1d695d609cf3609747cf19fd71">00398</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a7428d75741e0eb9add87c4a2f672581e">c_size_mult_high</a> : 2;
<a name="l00399"></a><a class="code" href="struct_c_s_d_v1.html#aa018db4afbad1a906ffc7c2f16e949b6">00399</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa018db4afbad1a906ffc7c2f16e949b6">vdd_w_cur_max</a> : 3;
<a name="l00400"></a><a class="code" href="struct_c_s_d_v1.html#a17680224cd64eb6021437f4955b6392b">00400</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a17680224cd64eb6021437f4955b6392b">vdd_w_curr_min</a> : 3;
<a name="l00401"></a>00401   <span class="comment">// byte 10</span>
<a name="l00402"></a><a class="code" href="struct_c_s_d_v1.html#a2580a4c6ddd99928402db34c2f650033">00402</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a2580a4c6ddd99928402db34c2f650033">sector_size_high</a> : 6;
<a name="l00403"></a><a class="code" href="struct_c_s_d_v1.html#aa0ada858f4a1455c6cb4e9b7523d8fd1">00403</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa0ada858f4a1455c6cb4e9b7523d8fd1">erase_blk_en</a> : 1;
<a name="l00404"></a><a class="code" href="struct_c_s_d_v1.html#a6ac71fb99912431be5df16b72a8f75e4">00404</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a6ac71fb99912431be5df16b72a8f75e4">c_size_mult_low</a> : 1;
<a name="l00405"></a>00405   <span class="comment">// byte 11</span>
<a name="l00406"></a><a class="code" href="struct_c_s_d_v1.html#a3574bbe4ccfc7f26daa84efd98a9ff4c">00406</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a3574bbe4ccfc7f26daa84efd98a9ff4c">wp_grp_size</a> : 7;
<a name="l00407"></a><a class="code" href="struct_c_s_d_v1.html#afcbc43e43942a772e79ef2aa55e37650">00407</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#afcbc43e43942a772e79ef2aa55e37650">sector_size_low</a> : 1;
<a name="l00408"></a>00408   <span class="comment">// byte 12</span>
<a name="l00409"></a><a class="code" href="struct_c_s_d_v1.html#af31036ae33a6db8cf3db322fef249b48">00409</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af31036ae33a6db8cf3db322fef249b48">write_bl_len_high</a> : 2;
<a name="l00410"></a><a class="code" href="struct_c_s_d_v1.html#acbc1184d8705d3631d9492f927ccb8e8">00410</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#acbc1184d8705d3631d9492f927ccb8e8">r2w_factor</a> : 3;
<a name="l00411"></a><a class="code" href="struct_c_s_d_v1.html#a6525406821be82277577a768a2d4e904">00411</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a6525406821be82277577a768a2d4e904">reserved3</a> : 2;
<a name="l00412"></a><a class="code" href="struct_c_s_d_v1.html#ab4247b023129bd89e0cebe8508b35f0a">00412</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ab4247b023129bd89e0cebe8508b35f0a">wp_grp_enable</a> : 1;
<a name="l00413"></a>00413   <span class="comment">// byte 13</span>
<a name="l00414"></a><a class="code" href="struct_c_s_d_v1.html#a1dcde2e7c54e279f4d7aac27d130cc17">00414</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a1dcde2e7c54e279f4d7aac27d130cc17">reserved4</a> : 5;
<a name="l00415"></a><a class="code" href="struct_c_s_d_v1.html#a062890f25943538976760e7db822a635">00415</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a062890f25943538976760e7db822a635">write_partial</a> : 1;
<a name="l00416"></a><a class="code" href="struct_c_s_d_v1.html#ad61c0325b9602bdb15cf59b69fc4a67f">00416</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ad61c0325b9602bdb15cf59b69fc4a67f">write_bl_len_low</a> : 2;
<a name="l00417"></a>00417   <span class="comment">// byte 14</span>
<a name="l00418"></a><a class="code" href="struct_c_s_d_v1.html#a6dd54d3f51fc8f0916d8882851d26d91">00418</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a6dd54d3f51fc8f0916d8882851d26d91">reserved5</a>: 2;
<a name="l00419"></a><a class="code" href="struct_c_s_d_v1.html#aa1a7dd102774cf915cbe66010250253d">00419</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa1a7dd102774cf915cbe66010250253d">file_format</a> : 2;
<a name="l00420"></a><a class="code" href="struct_c_s_d_v1.html#a0d4a26aaf05de47ca630a0976e897f90">00420</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a0d4a26aaf05de47ca630a0976e897f90">tmp_write_protect</a> : 1;
<a name="l00421"></a><a class="code" href="struct_c_s_d_v1.html#a674d846d31b5a170bf7b2a27d8c8856a">00421</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a674d846d31b5a170bf7b2a27d8c8856a">perm_write_protect</a> : 1;
<a name="l00422"></a><a class="code" href="struct_c_s_d_v1.html#a0ff3051eb9cb79426196331363674fa7">00422</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a0ff3051eb9cb79426196331363674fa7">copy</a> : 1;
<a name="l00424"></a><a class="code" href="struct_c_s_d_v1.html#aa44f7b6ef5fd710a716fa9ef045c68f0">00424</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa44f7b6ef5fd710a716fa9ef045c68f0">file_format_grp</a> : 1;
<a name="l00425"></a>00425   <span class="comment">// byte 15</span>
<a name="l00426"></a><a class="code" href="struct_c_s_d_v1.html#af3bbe76c61e108c500f5a861dff1e6c2">00426</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af3bbe76c61e108c500f5a861dff1e6c2">always1</a> : 1;
<a name="l00427"></a><a class="code" href="struct_c_s_d_v1.html#aa7963a1d695d609cf3609747cf19fd71">00427</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa7963a1d695d609cf3609747cf19fd71">crc</a> : 7;
<a name="l00428"></a>00428 }<a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((packed)) csd1_t;
<a name="l00429"></a>00429 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00431"></a><a class="code" href="_sd_fat_8h.html#a468f68d66a14a0e3d70ae9dce7c7b084">00431</a> <span class="comment"></span>typedef struct <a class="code" href="struct_c_s_d_v2.html">CSDV2</a> {
<a name="l00432"></a>00432   <span class="comment">// byte 0</span>
<a name="l00433"></a><a class="code" href="_sd_fat_8h.html#add15a5302761bd6e2ee294c0c38e9f8a">00433</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#affe215a7220b2d52fb9dacf3b35e56dc">reserved1</a> : 6;
<a name="l00434"></a><a class="code" href="struct_c_s_d_v2.html#a468f68d66a14a0e3d70ae9dce7c7b084">00434</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a468f68d66a14a0e3d70ae9dce7c7b084">csd_ver</a> : 2;
<a name="l00435"></a><a class="code" href="_sd_fat_8h.html#a877524d1f9ede3c07079957826d08a1e">00435</a>   <span class="comment">// byte 1</span>
<a name="l00437"></a><a class="code" href="_sd_fat_8h.html#af83be4d825b2e325d094297e81693443">00437</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#add15a5302761bd6e2ee294c0c38e9f8a">taac</a>;
<a name="l00438"></a>00438   <span class="comment">// byte 2</span>
<a name="l00440"></a><a class="code" href="struct_c_s_d_v2.html#a877524d1f9ede3c07079957826d08a1e">00440</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_c_s_d_v2.html#a877524d1f9ede3c07079957826d08a1e">nsac</a>;
<a name="l00441"></a><a class="code" href="_sd_fat_8h.html#af43ab7cd256a4134cd3b78bdecb9d7c5">00441</a>   <span class="comment">// byte 3</span>
<a name="l00442"></a><a class="code" href="_sd_fat_8h.html#ad38ba451d9647c41a9b60a2f7a61e9d4">00442</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af83be4d825b2e325d094297e81693443">tran_speed</a>;
<a name="l00443"></a>00443   <span class="comment">// byte 4</span>
<a name="l00444"></a><a class="code" href="_sd_fat_8h.html#a8ca62fc4ed0f6598005209d3c34f9c44">00444</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a76b00b1b0657aefa115a98f122aca8c5">ccc_high</a>;
<a name="l00445"></a><a class="code" href="_sd_fat_8h.html#add22350e7fe29ca6649dd6564e8425ea">00445</a>   <span class="comment">// byte 5</span>
<a name="l00447"></a><a class="code" href="_sd_fat_8h.html#a31c0f3174289d3fb8abade294770fc33">00447</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af43ab7cd256a4134cd3b78bdecb9d7c5">read_bl_len</a> : 4;
<a name="l00448"></a><a class="code" href="_sd_fat_8h.html#a5fd0cab21c874fd49fc4ea5d537be201">00448</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ad38ba451d9647c41a9b60a2f7a61e9d4">ccc_low</a> : 4;
<a name="l00449"></a><a class="code" href="_sd_fat_8h.html#a7387a4ab3ec1161c246ed02941e1325e">00449</a>   <span class="comment">// byte 6</span>
<a name="l00451"></a><a class="code" href="_sd_fat_8h.html#a8cd3e8cdbf34be110b1d87b0c5f7b1d8">00451</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#add22350e7fe29ca6649dd6564e8425ea">reserved2</a> : 4;
<a name="l00452"></a><a class="code" href="struct_c_s_d_v2.html#adca766448ce5830490363d3fbb02ab4b">00452</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#adca766448ce5830490363d3fbb02ab4b">dsr_imp</a> : 1;
<a name="l00454"></a><a class="code" href="_sd_fat_8h.html#a0e5dbcfa1434c0d43a5f71067b54377a">00454</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a31c0f3174289d3fb8abade294770fc33">read_blk_misalign</a> :1;
<a name="l00456"></a><a class="code" href="struct_c_s_d_v2.html#a5fd0cab21c874fd49fc4ea5d537be201">00456</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a5fd0cab21c874fd49fc4ea5d537be201">write_blk_misalign</a> : 1;
<a name="l00458"></a><a class="code" href="_sd_fat_8h.html#aa018db4afbad1a906ffc7c2f16e949b6">00458</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a7387a4ab3ec1161c246ed02941e1325e">read_bl_partial</a> : 1;
<a name="l00459"></a><a class="code" href="_sd_fat_8h.html#a17680224cd64eb6021437f4955b6392b">00459</a>   <span class="comment">// byte 7</span>
<a name="l00461"></a><a class="code" href="_sd_fat_8h.html#a2580a4c6ddd99928402db34c2f650033">00461</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a8ca62fc4ed0f6598005209d3c34f9c44">c_size_high</a> : 6;
<a name="l00463"></a><a class="code" href="_sd_fat_8h.html#a6ac71fb99912431be5df16b72a8f75e4">00463</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a6525406821be82277577a768a2d4e904">reserved3</a> : 2;
<a name="l00464"></a>00464   <span class="comment">// byte 8</span>
<a name="l00466"></a><a class="code" href="_sd_fat_8h.html#afcbc43e43942a772e79ef2aa55e37650">00466</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a8cd3e8cdbf34be110b1d87b0c5f7b1d8">c_size_mid</a>;
<a name="l00467"></a>00467   <span class="comment">// byte 9</span>
<a name="l00469"></a><a class="code" href="_sd_fat_8h.html#acbc1184d8705d3631d9492f927ccb8e8">00469</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a2af914ea8fe2b045432553e2d7c75bb7">c_size_low</a>;
<a name="l00470"></a><a class="code" href="_sd_fat_8h.html#a6525406821be82277577a768a2d4e904">00470</a>   <span class="comment">// byte 10</span>
<a name="l00472"></a><a class="code" href="struct_c_s_d_v2.html#a2580a4c6ddd99928402db34c2f650033">00472</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a2580a4c6ddd99928402db34c2f650033">sector_size_high</a> : 6;
<a name="l00474"></a><a class="code" href="_sd_fat_8h.html#a062890f25943538976760e7db822a635">00474</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa0ada858f4a1455c6cb4e9b7523d8fd1">erase_blk_en</a> : 1;
<a name="l00476"></a><a class="code" href="struct_c_s_d_v2.html#a1dcde2e7c54e279f4d7aac27d130cc17">00476</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a1dcde2e7c54e279f4d7aac27d130cc17">reserved4</a> : 1;
<a name="l00477"></a><a class="code" href="_sd_fat_8h.html#a6dd54d3f51fc8f0916d8882851d26d91">00477</a>   <span class="comment">// byte 11</span>
<a name="l00478"></a><a class="code" href="_sd_fat_8h.html#aa1a7dd102774cf915cbe66010250253d">00478</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a3574bbe4ccfc7f26daa84efd98a9ff4c">wp_grp_size</a> : 7;
<a name="l00480"></a><a class="code" href="_sd_fat_8h.html#a674d846d31b5a170bf7b2a27d8c8856a">00480</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#afcbc43e43942a772e79ef2aa55e37650">sector_size_low</a> : 1;
<a name="l00481"></a><a class="code" href="_sd_fat_8h.html#a0ff3051eb9cb79426196331363674fa7">00481</a>   <span class="comment">// byte 12</span>
<a name="l00483"></a><a class="code" href="_sd_fat_8h.html#aa44f7b6ef5fd710a716fa9ef045c68f0">00483</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af31036ae33a6db8cf3db322fef249b48">write_bl_len_high</a> : 2;
<a name="l00485"></a><a class="code" href="struct_c_s_d_v2.html#acbc1184d8705d3631d9492f927ccb8e8">00485</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#acbc1184d8705d3631d9492f927ccb8e8">r2w_factor</a> : 3;
<a name="l00487"></a><a class="code" href="struct_c_s_d_v2.html#a6dd54d3f51fc8f0916d8882851d26d91">00487</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a6dd54d3f51fc8f0916d8882851d26d91">reserved5</a> : 2;
<a name="l00489"></a><a class="code" href="struct_c_s_d_v2.html#ab4247b023129bd89e0cebe8508b35f0a">00489</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ab4247b023129bd89e0cebe8508b35f0a">wp_grp_enable</a> : 1;
<a name="l00490"></a>00490   <span class="comment">// byte 13</span>
<a name="l00491"></a><a class="code" href="struct_c_s_d_v2.html#aa8656feb1159d94a13733e19da33d258">00491</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa8656feb1159d94a13733e19da33d258">reserved6</a> : 5;
<a name="l00493"></a><a class="code" href="struct_c_s_d_v2.html#a062890f25943538976760e7db822a635">00493</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a062890f25943538976760e7db822a635">write_partial</a> : 1;
<a name="l00495"></a><a class="code" href="struct_c_s_d_v2.html#ad61c0325b9602bdb15cf59b69fc4a67f">00495</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#ad61c0325b9602bdb15cf59b69fc4a67f">write_bl_len_low</a> : 2;
<a name="l00496"></a>00496   <span class="comment">// byte 14</span>
<a name="l00497"></a><a class="code" href="struct_c_s_d_v2.html#a88028b6a6993ea4c35717196f8e16a9e">00497</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a88028b6a6993ea4c35717196f8e16a9e">reserved7</a>: 2;
<a name="l00499"></a><a class="code" href="struct_c_s_d_v2.html#aa1a7dd102774cf915cbe66010250253d">00499</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa1a7dd102774cf915cbe66010250253d">file_format</a> : 2;
<a name="l00500"></a><a class="code" href="struct_c_s_d_v2.html#a0d4a26aaf05de47ca630a0976e897f90">00500</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a0d4a26aaf05de47ca630a0976e897f90">tmp_write_protect</a> : 1;
<a name="l00501"></a><a class="code" href="struct_c_s_d_v2.html#a674d846d31b5a170bf7b2a27d8c8856a">00501</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a674d846d31b5a170bf7b2a27d8c8856a">perm_write_protect</a> : 1;
<a name="l00502"></a><a class="code" href="struct_c_s_d_v2.html#a0ff3051eb9cb79426196331363674fa7">00502</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#a0ff3051eb9cb79426196331363674fa7">copy</a> : 1;
<a name="l00504"></a><a class="code" href="struct_c_s_d_v2.html#aa44f7b6ef5fd710a716fa9ef045c68f0">00504</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa44f7b6ef5fd710a716fa9ef045c68f0">file_format_grp</a> : 1;
<a name="l00505"></a>00505   <span class="comment">// byte 15</span>
<a name="l00507"></a><a class="code" href="struct_c_s_d_v2.html#af3bbe76c61e108c500f5a861dff1e6c2">00507</a> <span class="comment"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#af3bbe76c61e108c500f5a861dff1e6c2">always1</a> : 1;
<a name="l00509"></a><a class="code" href="struct_c_s_d_v2.html#aa7963a1d695d609cf3609747cf19fd71">00509</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="_sd_fat_8h.html#aa7963a1d695d609cf3609747cf19fd71">crc</a> : 7;
<a name="l00510"></a>00510 }<a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((packed)) csd2_t;
<a name="l00511"></a>00511 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00513"></a><a class="code" href="unioncsd__t.html">00513</a> <span class="comment"></span>union <a class="code" href="unioncsd__t.html">csd_t</a> {
<a name="l00514"></a><a class="code" href="unioncsd__t.html#a83f0a5c54ecca665792b1dde2c5c5325">00514</a>   csd1_t <a class="code" href="unioncsd__t.html#a83f0a5c54ecca665792b1dde2c5c5325">v1</a>;
<a name="l00515"></a><a class="code" href="unioncsd__t.html#ae4e2f6d93a8c0d4607a94f6b2599c62c">00515</a>   csd2_t <a class="code" href="unioncsd__t.html#ae4e2f6d93a8c0d4607a94f6b2599c62c">v2</a>;
<a name="l00516"></a>00516 };
<a name="l00517"></a>00517 
<a name="l00518"></a>00518 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00526"></a><a class="code" href="_sd_fat_8h.html#af2e76ffb2fdb830175abf513dd640fdd">00526</a> <span class="comment"></span><span class="preprocessor">#define USE_SD_CRC 2</span>
<a name="l00527"></a>00527 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00535"></a><a class="code" href="_sd_fat_8h.html#ac6b66d035a552c981ab0db9006bdfb7b">00535</a> <span class="comment"></span><span class="preprocessor">#define USE_MULTIPLE_CARDS 0</span>
<a name="l00536"></a>00536 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00542"></a><a class="code" href="_sd_fat_8h.html#a9a2b1ca4d91cff876f48deeaacbc33da">00542</a> <span class="comment"></span><span class="preprocessor">#define DESTRUCTOR_CLOSES_FILE 0</span>
<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00544"></a>00544 
<a name="l00550"></a>00550 <span class="preprocessor">#ifdef __arm__</span>
<a name="l00551"></a>00551 <span class="preprocessor"></span><span class="preprocessor">#define USE_SEPARATE_FAT_CACHE 1</span>
<a name="l00552"></a>00552 <span class="preprocessor"></span><span class="preprocessor">#else  // __arm__</span>
<a name="l00553"></a><a class="code" href="_sd_fat_8h.html#a23f662882413dcb017ebd8107473b8c3">00553</a> <span class="preprocessor"></span><span class="preprocessor">#define USE_SEPARATE_FAT_CACHE 0</span>
<a name="l00554"></a>00554 <span class="preprocessor"></span><span class="preprocessor">#endif  // __arm__</span>
<a name="l00555"></a>00555 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00559"></a>00559 <span class="comment"></span><span class="preprocessor">#if defined(RAMEND) &amp;&amp; (RAMEND &lt; 3000 || (NONLINEAR_SYSTEM &amp;&amp; RAMEND&lt;8000))</span>
<a name="l00560"></a>00560 <span class="preprocessor"></span><span class="preprocessor">#define USE_MULTI_BLOCK_SD_IO 0</span>
<a name="l00561"></a>00561 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00562"></a><a class="code" href="_sd_fat_8h.html#ac551245b3e5d757ea6d3f4867b939f5b">00562</a> <span class="preprocessor"></span><span class="preprocessor">#define USE_MULTI_BLOCK_SD_IO 1</span>
<a name="l00563"></a>00563 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00564"></a>00564 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00569"></a><a class="code" href="_sd_fat_8h.html#a8dfff1c0ff6919b9eeaa17120834c23d">00569</a> <span class="comment"></span><span class="preprocessor">#define USE_ARDUINO_SPI_LIBRARY 0</span>
<a name="l00570"></a><a class="code" href="_sd_fat_8h.html#aa8656feb1159d94a13733e19da33d258">00570</a> <span class="preprocessor"></span>
<a name="l00571"></a>00571 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00572"></a>00572 
<a name="l00576"></a><a class="code" href="_sd_fat_8h.html#a88028b6a6993ea4c35717196f8e16a9e">00576</a> <span class="preprocessor">#if defined(__arm__) &amp;&amp; defined(CORE_TEENSY)</span>
<a name="l00577"></a>00577 <span class="preprocessor"></span><span class="preprocessor">#define USE_NATIVE_MK20DX128_SPI 1</span>
<a name="l00578"></a>00578 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00579"></a><a class="code" href="_sd_fat_8h.html#a0e67a549e139c3e792261fa36e0a69e6">00579</a> <span class="preprocessor"></span><span class="preprocessor">#define USE_NATIVE_MK20DX128_SPI 0</span>
<a name="l00580"></a>00580 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00581"></a>00581 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00585"></a>00585 <span class="comment"></span><span class="preprocessor">#if defined(__arm__) &amp;&amp; !defined(CORE_TEENSY)</span>
<a name="l00586"></a>00586 <span class="preprocessor"></span><span class="preprocessor">#define USE_NATIVE_SAM3X_SPI 1</span>
<a name="l00587"></a>00587 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00588"></a><a class="code" href="_sd_fat_8h.html#a87c59beeb1465d2d3b5faf008031a037">00588</a> <span class="preprocessor"></span><span class="preprocessor">#define USE_NATIVE_SAM3X_SPI 0</span>
<a name="l00589"></a>00589 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00590"></a>00590 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00602"></a><a class="code" href="_sd_fat_8h.html#ab4b647a03aa38c5fcc2d6f8301410fce">00602</a> <span class="comment"></span><span class="preprocessor">#define USE_SERIAL_FOR_STD_OUT 0</span>
<a name="l00603"></a>00603 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00621"></a><a class="code" href="_sd_fat_8h.html#a270eefdaec4778f2a491658f34f61b17">00621</a> <span class="comment"></span><span class="preprocessor">#define ENDL_CALLS_FLUSH 0</span>
<a name="l00622"></a>00622 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00626"></a><a class="code" href="_sd_fat_8h.html#af8ef36dfd023f41169baa17d05f55c56">00626</a> <span class="comment"></span><span class="preprocessor">#define ALLOW_DEPRECATED_FUNCTIONS 0</span>
<a name="l00627"></a>00627 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00632"></a><a class="code" href="_sd_fat_8h.html#a28998c5daf4bd038f4f93172698320b1">00632</a> <span class="comment"></span><span class="preprocessor">#define FAT12_SUPPORT 0</span>
<a name="l00633"></a>00633 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00638"></a><a class="code" href="_sd_fat_8h.html#aa94c2fdbafa7278baa2afa1c97dc6546">00638</a> <span class="comment"></span><span class="preprocessor">#define SPI_SD_INIT_RATE 11</span>
<a name="l00639"></a>00639 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00644"></a><a class="code" href="_sd_fat_8h.html#ab780c3f0584e602320e2f746f73e0d5d">00644</a> <span class="comment"></span><span class="preprocessor">#define SET_SPI_SS_HIGH 1</span>
<a name="l00645"></a>00645 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00655"></a><a class="code" href="_sd_fat_8h.html#ad3a00a466d2b81cff13c5447a09d704b">00655</a> <span class="comment"></span><span class="preprocessor">#define MEGA_SOFT_SPI 0</span>
<a name="l00656"></a>00656 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00666"></a><a class="code" href="_sd_fat_8h.html#a60a162fdb06d182b5cefc271d67ea765">00666</a> <span class="comment"></span><span class="preprocessor">#define LEONARDO_SOFT_SPI 0</span>
<a name="l00667"></a>00667 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00671"></a><a class="code" href="_sd_fat_8h.html#adc58bc95f1a1e044149d907287cb79a1">00671</a> <span class="comment"></span><span class="preprocessor">#define USE_SOFTWARE_SPI 0</span>
<a name="l00672"></a>00672 <span class="preprocessor"></span><span class="comment">// define software SPI pins so Mega can use unmodified 168/328 shields</span>
<a name="l00674"></a><a class="code" href="_sd_fat_8h.html#a5e0307dbc42b2444deedd558bcdd8933">00674</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5e0307dbc42b2444deedd558bcdd8933">SOFT_SPI_CS_PIN</a> = 10;
<a name="l00676"></a><a class="code" href="_sd_fat_8h.html#ac2f492b4970ffbbea92d5d3e3f8aa2f0">00676</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac2f492b4970ffbbea92d5d3e3f8aa2f0">SOFT_SPI_MOSI_PIN</a> = 11;
<a name="l00678"></a><a class="code" href="_sd_fat_8h.html#af12e3a0d80cb8c7c9e3841887c508f3f">00678</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#af12e3a0d80cb8c7c9e3841887c508f3f">SOFT_SPI_MISO_PIN</a> = 12;
<a name="l00680"></a><a class="code" href="_sd_fat_8h.html#add7db7df22669e60cddd5698113d6327">00680</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#add7db7df22669e60cddd5698113d6327">SOFT_SPI_SCK_PIN</a> = 13;
<a name="l00681"></a>00681 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00682"></a>00682 <span class="comment">// SPI speed is F_CPU/2^(1 + index), 0 &lt;= index &lt;= 6</span>
<a name="l00684"></a><a class="code" href="_sd_fat_8h.html#a6c091c07d1eb82a94b1c5738f720264b">00684</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a6c091c07d1eb82a94b1c5738f720264b">SPI_FULL_SPEED</a> = 0;
<a name="l00686"></a><a class="code" href="_sd_fat_8h.html#a5a1200ff5e0c910fdea6eca447d10a19">00686</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5a1200ff5e0c910fdea6eca447d10a19">SPI_DIV3_SPEED</a> = 1;
<a name="l00688"></a><a class="code" href="_sd_fat_8h.html#abf126d9da3318e2709bbc3f2ab3cb3d1">00688</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#abf126d9da3318e2709bbc3f2ab3cb3d1">SPI_HALF_SPEED</a> = 2;
<a name="l00690"></a><a class="code" href="_sd_fat_8h.html#a491576f0359638403febf9289f7e4fbd">00690</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a491576f0359638403febf9289f7e4fbd">SPI_DIV6_SPEED</a> = 3;
<a name="l00692"></a><a class="code" href="_sd_fat_8h.html#ad6a75e4ff6409fe1305ec6915787458e">00692</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ad6a75e4ff6409fe1305ec6915787458e">SPI_QUARTER_SPEED</a> = 4;
<a name="l00694"></a><a class="code" href="_sd_fat_8h.html#acf9e8ae5785dfdaa0fa59042e528ea6c">00694</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#acf9e8ae5785dfdaa0fa59042e528ea6c">SPI_EIGHTH_SPEED</a> = 6;
<a name="l00696"></a><a class="code" href="_sd_fat_8h.html#a792e282c1b86c65d14e3d6e6612ad2d0">00696</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a792e282c1b86c65d14e3d6e6612ad2d0">SPI_SIXTEENTH_SPEED</a> = 8;
<a name="l00698"></a><a class="code" href="_sd_fat_8h.html#a2d32bcdd4baf13c77aecf1f60d3018a1">00698</a> <span class="keyword">const</span> uint8_t <a class="code" href="_sd_fat_8h.html#a2d32bcdd4baf13c77aecf1f60d3018a1">MAX_SCK_RATE_ID</a> = 14;
<a name="l00699"></a>00699 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00701"></a><a class="code" href="_sd_fat_8h.html#ab7b9920a819e60f97f988ee13b3ddc40">00701</a> <span class="comment"></span>uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ab7b9920a819e60f97f988ee13b3ddc40">SD_INIT_TIMEOUT</a> = 2000;
<a name="l00703"></a><a class="code" href="_sd_fat_8h.html#afb7454898d781c58caa00f82f0f14f63">00703</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#afb7454898d781c58caa00f82f0f14f63">SD_ERASE_TIMEOUT</a> = 10000;
<a name="l00705"></a><a class="code" href="_sd_fat_8h.html#a02f6ddc876ebab300586940bd111eccd">00705</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a02f6ddc876ebab300586940bd111eccd">SD_READ_TIMEOUT</a> = 300;
<a name="l00707"></a><a class="code" href="_sd_fat_8h.html#a9984cf4ab3088ae5470d56e10e9f23c9">00707</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a9984cf4ab3088ae5470d56e10e9f23c9">SD_WRITE_TIMEOUT</a> = 600;
<a name="l00708"></a>00708 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00709"></a>00709 <span class="comment">// SD card errors</span>
<a name="l00711"></a><a class="code" href="_sd_fat_8h.html#a3803cc53ecc2b346ba950053f3dced47">00711</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a3803cc53ecc2b346ba950053f3dced47">SD_CARD_ERROR_CMD0</a> = 0X1;
<a name="l00713"></a><a class="code" href="_sd_fat_8h.html#a2da93442c11fa58ffd24fe9d7038393d">00713</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a2da93442c11fa58ffd24fe9d7038393d">SD_CARD_ERROR_CMD8</a> = 0X2;
<a name="l00715"></a><a class="code" href="_sd_fat_8h.html#ae713a04caec74b7a412fc3a4ca7ee8fd">00715</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ae713a04caec74b7a412fc3a4ca7ee8fd">SD_CARD_ERROR_CMD12</a> = 0X3;
<a name="l00717"></a><a class="code" href="_sd_fat_8h.html#a2e79398dcb2711672e50dc2bea94e141">00717</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a2e79398dcb2711672e50dc2bea94e141">SD_CARD_ERROR_CMD17</a> = 0X4;
<a name="l00719"></a><a class="code" href="_sd_fat_8h.html#a15f61426677cddfb1504e4b98900ae05">00719</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a15f61426677cddfb1504e4b98900ae05">SD_CARD_ERROR_CMD18</a> = 0X5;
<a name="l00721"></a><a class="code" href="_sd_fat_8h.html#ade761c5ed037fbe0598f80c5e6d34268">00721</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ade761c5ed037fbe0598f80c5e6d34268">SD_CARD_ERROR_CMD24</a> = 0X6;
<a name="l00723"></a><a class="code" href="_sd_fat_8h.html#a4840a2a3026b537bf0e6a679715ec734">00723</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a4840a2a3026b537bf0e6a679715ec734">SD_CARD_ERROR_CMD25</a> = 0X7;
<a name="l00725"></a><a class="code" href="_sd_fat_8h.html#a0ebfb17cbc424fd2138918aa72307292">00725</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a0ebfb17cbc424fd2138918aa72307292">SD_CARD_ERROR_CMD58</a> = 0X8;
<a name="l00727"></a><a class="code" href="_sd_fat_8h.html#aa69b04c3716e3e9962617e264e7ebe44">00727</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#aa69b04c3716e3e9962617e264e7ebe44">SD_CARD_ERROR_ACMD23</a> = 0X9;
<a name="l00729"></a><a class="code" href="_sd_fat_8h.html#a62fdea7af4f09fb98f302bac1bfa17c2">00729</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a62fdea7af4f09fb98f302bac1bfa17c2">SD_CARD_ERROR_ACMD41</a> = 0XA;
<a name="l00731"></a><a class="code" href="_sd_fat_8h.html#a0bbae62f7c90e60614cfa9063101c5e1">00731</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a0bbae62f7c90e60614cfa9063101c5e1">SD_CARD_ERROR_BAD_CSD</a> = 0XB;
<a name="l00733"></a><a class="code" href="_sd_fat_8h.html#a7726e63b7a04bc15b70901b418d6dd1e">00733</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a7726e63b7a04bc15b70901b418d6dd1e">SD_CARD_ERROR_ERASE</a> = 0XC;
<a name="l00735"></a><a class="code" href="_sd_fat_8h.html#a00e05ddd835d81e0b4d78ededae70a3c">00735</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a00e05ddd835d81e0b4d78ededae70a3c">SD_CARD_ERROR_ERASE_SINGLE_BLOCK</a> = 0XD;
<a name="l00737"></a><a class="code" href="_sd_fat_8h.html#a8121967a262a076c5191a0e855531f99">00737</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a8121967a262a076c5191a0e855531f99">SD_CARD_ERROR_ERASE_TIMEOUT</a> = 0XE;
<a name="l00739"></a><a class="code" href="_sd_fat_8h.html#adb9b963e8c54c4daf616cc5fdc4010ac">00739</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#adb9b963e8c54c4daf616cc5fdc4010ac">SD_CARD_ERROR_READ</a> = 0XF;
<a name="l00741"></a><a class="code" href="_sd_fat_8h.html#af1cdb9d8082532f4fe4b7cf1931dddbe">00741</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#af1cdb9d8082532f4fe4b7cf1931dddbe">SD_CARD_ERROR_READ_REG</a> = 0X10;
<a name="l00743"></a><a class="code" href="_sd_fat_8h.html#a49c57f2b1d31fe1b0baf73fab5bd469b">00743</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a49c57f2b1d31fe1b0baf73fab5bd469b">SD_CARD_ERROR_READ_TIMEOUT</a> = 0X11;
<a name="l00745"></a><a class="code" href="_sd_fat_8h.html#a87264e66265e36be6b1428ebacf2e4ed">00745</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a87264e66265e36be6b1428ebacf2e4ed">SD_CARD_ERROR_STOP_TRAN</a> = 0X12;
<a name="l00747"></a><a class="code" href="_sd_fat_8h.html#a98bb1b625b0b9ce99d8494fbb195274c">00747</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a98bb1b625b0b9ce99d8494fbb195274c">SD_CARD_ERROR_WRITE</a> = 0X13;
<a name="l00749"></a><a class="code" href="_sd_fat_8h.html#a376db89ebd1e212110419e3ac7a0c33f">00749</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a376db89ebd1e212110419e3ac7a0c33f">SD_CARD_ERROR_WRITE_BLOCK_ZERO</a> = 0X14;  <span class="comment">// REMOVE - not used</span>
<a name="l00751"></a><a class="code" href="_sd_fat_8h.html#a30bc1de9e3914ace0b9dc30f99a0edea">00751</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a30bc1de9e3914ace0b9dc30f99a0edea">SD_CARD_ERROR_WRITE_MULTIPLE</a> = 0X15;
<a name="l00753"></a><a class="code" href="_sd_fat_8h.html#a06b427dad894918bd33fe2e74c50c2e0">00753</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a06b427dad894918bd33fe2e74c50c2e0">SD_CARD_ERROR_WRITE_PROGRAMMING</a> = 0X16;
<a name="l00755"></a><a class="code" href="_sd_fat_8h.html#ae6574296ec37c52209c5f2c5664dccdb">00755</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ae6574296ec37c52209c5f2c5664dccdb">SD_CARD_ERROR_WRITE_TIMEOUT</a> = 0X17;
<a name="l00757"></a><a class="code" href="_sd_fat_8h.html#aa4036973d09278197c2949181094e8e2">00757</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#aa4036973d09278197c2949181094e8e2">SD_CARD_ERROR_SCK_RATE</a> = 0X18;
<a name="l00759"></a><a class="code" href="_sd_fat_8h.html#ab2b7080183030b2cce47b7469e0dde7d">00759</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ab2b7080183030b2cce47b7469e0dde7d">SD_CARD_ERROR_INIT_NOT_CALLED</a> = 0X19;
<a name="l00761"></a><a class="code" href="_sd_fat_8h.html#a974f951f7de236ad1bf498344c573b26">00761</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a974f951f7de236ad1bf498344c573b26">SD_CARD_ERROR_CMD59</a> = 0X1A;
<a name="l00763"></a><a class="code" href="_sd_fat_8h.html#afb7f0b9a1a4ea92107204508c893cc81">00763</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#afb7f0b9a1a4ea92107204508c893cc81">SD_CARD_ERROR_READ_CRC</a> = 0X1B;
<a name="l00765"></a><a class="code" href="_sd_fat_8h.html#ae10703397b36b451e590946497a58867">00765</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ae10703397b36b451e590946497a58867">SD_CARD_ERROR_SPI_DMA</a> = 0X1C;
<a name="l00766"></a>00766 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00767"></a>00767 <span class="comment">// card types</span>
<a name="l00769"></a><a class="code" href="_sd_fat_8h.html#af55081a60d333ab063a5da5dd2c3633b">00769</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#af55081a60d333ab063a5da5dd2c3633b">SD_CARD_TYPE_SD1</a>  = 1;
<a name="l00771"></a><a class="code" href="_sd_fat_8h.html#a225807c91fc41717b4230d3b7e99c9f7">00771</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a225807c91fc41717b4230d3b7e99c9f7">SD_CARD_TYPE_SD2</a>  = 2;
<a name="l00773"></a><a class="code" href="_sd_fat_8h.html#a39b05691c3bcfffddd5d590589980f44">00773</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a39b05691c3bcfffddd5d590589980f44">SD_CARD_TYPE_SDHC</a> = 3;
<a name="l00777"></a>00777 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00778"></a>00778 <span class="preprocessor">#if LEONARDO_SOFT_SPI &amp;&amp; defined(__AVR_ATmega32U4__) &amp;&amp; !defined(CORE_TEENSY)</span>
<a name="l00779"></a>00779 <span class="preprocessor"></span><span class="preprocessor">#define SOFTWARE_SPI</span>
<a name="l00780"></a>00780 <span class="preprocessor"></span><span class="preprocessor">#elif MEGA_SOFT_SPI&amp;&amp;(defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__))</span>
<a name="l00781"></a>00781 <span class="preprocessor"></span><span class="preprocessor">#define SOFTWARE_SPI</span>
<a name="l00782"></a>00782 <span class="preprocessor"></span><span class="preprocessor">#elif USE_SOFTWARE_SPI</span>
<a name="l00783"></a>00783 <span class="preprocessor"></span><span class="preprocessor">#define SOFTWARE_SPI</span>
<a name="l00784"></a>00784 <span class="preprocessor"></span><span class="preprocessor">#endif  // LEONARDO_SOFT_SPI</span>
<a name="l00785"></a>00785 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00786"></a>00786 <span class="comment">// define default chip select pin</span>
<a name="l00787"></a>00787 <span class="comment">//</span>
<a name="l00788"></a>00788 <span class="preprocessor">#ifndef SOFTWARE_SPI</span>
<a name="l00789"></a>00789 <span class="preprocessor"></span><span class="comment">// hardware pin defs</span>
<a name="l00791"></a><a class="code" href="_sd_fat_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">00791</a> <span class="comment"></span>uint8_t <span class="keyword">const</span>  <a class="code" href="_sd_fat_8h.html#ae6b17538c14ba6c91ccb513db2c4c29c">SD_CHIP_SELECT_PIN</a> = <a class="code" href="pins_8h.html#ace91a4e928d61240785c9438be8651d0">SDSS</a>;
<a name="l00792"></a>00792 <span class="preprocessor">#else  // SOFTWARE_SPI</span>
<a name="l00793"></a>00793 <span class="preprocessor"></span>
<a name="l00794"></a>00794 uint8_t <span class="keyword">const</span> SD_CHIP_SELECT_PIN = <a class="code" href="_sd_fat_8h.html#a5e0307dbc42b2444deedd558bcdd8933">SOFT_SPI_CS_PIN</a>;
<a name="l00795"></a>00795 <span class="preprocessor">#endif  // SOFTWARE_SPI</span>
<a name="l00796"></a>00796 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00801"></a><a class="code" href="class_sd2_card.html">00801</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a> {
<a name="l00802"></a>00802  <span class="keyword">public</span>:
<a name="l00804"></a><a class="code" href="class_sd2_card.html#a1f49fb22b3890260d2b8672010b17f49">00804</a>   <a class="code" href="class_sd2_card.html#a1f49fb22b3890260d2b8672010b17f49">Sd2Card</a>() : <a class="code" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a>(SD_CARD_ERROR_INIT_NOT_CALLED), <a class="code" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>(0) {}
<a name="l00805"></a>00805   uint32_t <a class="code" href="class_sd2_card.html#a5ee7bcd3bda0173fa477efa86eaeab1a">cardSize</a>();
<a name="l00806"></a>00806   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a9d1aea769c0e71a39d5bcd1c5d8ce446">erase</a>(uint32_t firstBlock, uint32_t lastBlock);
<a name="l00807"></a>00807   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#ae780c9bffb14b9fbf7077d97fb810976">eraseSingleBlockEnable</a>();
<a name="l00812"></a><a class="code" href="class_sd2_card.html#aeca83c66edec1c068e687051abe76635">00812</a>   <span class="keywordtype">void</span> <a class="code" href="class_sd2_card.html#aeca83c66edec1c068e687051abe76635">error</a>(uint8_t code) {<a class="code" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a> = code;}
<a name="l00816"></a><a class="code" href="class_sd2_card.html#ad8be6f07f86730f2b2fed4bb34b10f33">00816</a>   <span class="keywordtype">int</span> <a class="code" href="class_sd2_card.html#ad8be6f07f86730f2b2fed4bb34b10f33">errorCode</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a>;}
<a name="l00818"></a><a class="code" href="class_sd2_card.html#a6f85fee8f55dfe119a47647cd4dfbcb9">00818</a>   <span class="keywordtype">int</span> <a class="code" href="class_sd2_card.html#a6f85fee8f55dfe119a47647cd4dfbcb9">errorData</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#a39abba51311659ff2052c48aab2eec79">status_</a>;}
<a name="l00825"></a>00825   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a008934b78ad099ce978883287b320b47">init</a>(uint8_t sckRateID = SPI_FULL_SPEED,
<a name="l00826"></a>00826     uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
<a name="l00827"></a>00827   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a2d3c126910c2c0c9d6ac468a459eec39">readBlock</a>(uint32_t block, uint8_t* dst);
<a name="l00837"></a><a class="code" href="class_sd2_card.html#ac2a262a5e6c508ec5d5b312f01b54e67">00837</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#ac2a262a5e6c508ec5d5b312f01b54e67">readCID</a>(cid_t* cid) {
<a name="l00838"></a>00838     <span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#af7820e455ba72ac41b8749ecce475523">readRegister</a>(<a class="code" href="_sd_fat_8h.html#a7228ab7c6f05aac53cf844e8e4a9a121">CMD10</a>, cid);
<a name="l00839"></a>00839   }
<a name="l00848"></a><a class="code" href="class_sd2_card.html#a4a73b4acf0416c0edd9ced858ad37656">00848</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a4a73b4acf0416c0edd9ced858ad37656">readCSD</a>(<a class="code" href="unioncsd__t.html">csd_t</a>* csd) {
<a name="l00849"></a>00849     <span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#af7820e455ba72ac41b8749ecce475523">readRegister</a>(<a class="code" href="_sd_fat_8h.html#afdee4fb07dae3bf93f0e9a0d9987143e">CMD9</a>, csd);
<a name="l00850"></a>00850   }
<a name="l00851"></a>00851   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#ace9c999f7d24d3382bb6a32ac1f271d1">readData</a>(uint8_t *dst);
<a name="l00852"></a>00852   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a2d7e430e3cb4a8509b356b94481ea3bd">readStart</a>(uint32_t blockNumber);
<a name="l00853"></a>00853   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a0d8e8db6267dc686d0de12986f432684">readStop</a>();
<a name="l00854"></a>00854   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a990e65b665bf8b131c864c6aba983141">setSckRate</a>(uint8_t sckRateID);
<a name="l00858"></a><a class="code" href="class_sd2_card.html#a4609e33962a63a3b71f17de25e8745aa">00858</a>   <span class="keywordtype">int</span> <a class="code" href="class_sd2_card.html#a4609e33962a63a3b71f17de25e8745aa">type</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>;}
<a name="l00859"></a>00859   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#af3f9516d0822ed675bf92a56c96ebf71">writeBlock</a>(uint32_t blockNumber, <span class="keyword">const</span> uint8_t* src);
<a name="l00860"></a>00860   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a29c4fb0721e5ef10b73dfc2d44ae080a">writeData</a>(<span class="keyword">const</span> uint8_t* src);
<a name="l00861"></a>00861   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#acb9f3776c0a7041e1bf2250a6b8dffbe">writeStart</a>(uint32_t blockNumber, uint32_t eraseCount);
<a name="l00862"></a>00862   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#ac4d108c05f53df893d53b7848fc364d8">writeStop</a>();
<a name="l00863"></a>00863 
<a name="l00864"></a>00864  <span class="keyword">private</span>:
<a name="l00865"></a>00865   <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00866"></a><a class="code" href="class_sd2_card.html#acf49e4d504c34ee0b0aba00296718e94">00866</a>   uint8_t <a class="code" href="class_sd2_card.html#acf49e4d504c34ee0b0aba00296718e94">chipSelectPin_</a>;
<a name="l00867"></a><a class="code" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">00867</a>   uint8_t <a class="code" href="class_sd2_card.html#a856093819b4013df8c568dab8c96b79e">errorCode_</a>;
<a name="l00868"></a><a class="code" href="class_sd2_card.html#a2be136cb8da5736ecdc6c0aed604c902">00868</a>   uint8_t <a class="code" href="class_sd2_card.html#a2be136cb8da5736ecdc6c0aed604c902">spiRate_</a>;
<a name="l00869"></a><a class="code" href="class_sd2_card.html#a39abba51311659ff2052c48aab2eec79">00869</a>   uint8_t <a class="code" href="class_sd2_card.html#a39abba51311659ff2052c48aab2eec79">status_</a>;
<a name="l00870"></a><a class="code" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">00870</a>   uint8_t <a class="code" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>;
<a name="l00871"></a>00871   <span class="comment">// private functions</span>
<a name="l00872"></a><a class="code" href="class_sd2_card.html#a4517419ec4bf821be8e34bb1562a906e">00872</a>   uint8_t <a class="code" href="class_sd2_card.html#a4517419ec4bf821be8e34bb1562a906e">cardAcmd</a>(uint8_t cmd, uint32_t arg) {
<a name="l00873"></a>00873     <a class="code" href="class_sd2_card.html#a4144ac40b43534083c41a7faf3383415">cardCommand</a>(<a class="code" href="_sd_fat_8h.html#a6e3cb1cf62a815db82fe9f343a4cb1a4">CMD55</a>, 0);
<a name="l00874"></a>00874     <span class="keywordflow">return</span> <a class="code" href="class_sd2_card.html#a4144ac40b43534083c41a7faf3383415">cardCommand</a>(cmd, arg);
<a name="l00875"></a>00875   }
<a name="l00876"></a>00876   uint8_t <a class="code" href="class_sd2_card.html#a4144ac40b43534083c41a7faf3383415">cardCommand</a>(uint8_t cmd, uint32_t arg);
<a name="l00877"></a>00877   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#ace9c999f7d24d3382bb6a32ac1f271d1">readData</a>(uint8_t* dst, <span class="keywordtype">size_t</span> count);
<a name="l00878"></a>00878   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#af7820e455ba72ac41b8749ecce475523">readRegister</a>(uint8_t cmd, <span class="keywordtype">void</span>* buf);
<a name="l00879"></a>00879   <span class="keywordtype">void</span> <a class="code" href="class_sd2_card.html#a4d554e76d6f91a5a0722fca298ee0242">chipSelectHigh</a>();
<a name="l00880"></a>00880   <span class="keywordtype">void</span> <a class="code" href="class_sd2_card.html#aad1f1ef78c225d04b1fffdc4cdd9f360">chipSelectLow</a>();
<a name="l00881"></a><a class="code" href="class_sd2_card.html#a731c4dba755005cf052ee8f8822ba5da">00881</a>   <span class="keywordtype">void</span> <a class="code" href="class_sd2_card.html#a731c4dba755005cf052ee8f8822ba5da">type</a>(uint8_t value) {<a class="code" href="class_sd2_card.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> = value;}
<a name="l00882"></a>00882   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a18cdbb44848cd7e02820694014768441">waitNotBusy</a>(uint16_t timeoutMillis);
<a name="l00883"></a>00883   <span class="keywordtype">bool</span> <a class="code" href="class_sd2_card.html#a29c4fb0721e5ef10b73dfc2d44ae080a">writeData</a>(uint8_t token, <span class="keyword">const</span> uint8_t* src);
<a name="l00884"></a>00884 };
<a name="l00885"></a>00885 
<a name="l00890"></a>00890 <span class="comment">/*</span>
<a name="l00891"></a>00891 <span class="comment"> * mostly from Microsoft document fatgen103.doc</span>
<a name="l00892"></a>00892 <span class="comment"> * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx</span>
<a name="l00893"></a>00893 <span class="comment"> */</span>
<a name="l00894"></a>00894 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00896"></a><a class="code" href="_sd_fat_8h.html#aa1aeb3a5e2838c5c7270fa17bcc31e8e">00896</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#aa1aeb3a5e2838c5c7270fa17bcc31e8e">BOOTSIG0</a> = 0X55;
<a name="l00898"></a><a class="code" href="_sd_fat_8h.html#a1b5a143c48d93d6f4e3fc1f5f3ac1dc3">00898</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a1b5a143c48d93d6f4e3fc1f5f3ac1dc3">BOOTSIG1</a> = 0XAA;
<a name="l00900"></a><a class="code" href="_sd_fat_8h.html#ac856ff0a92288eb124e1688581628cd0">00900</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac856ff0a92288eb124e1688581628cd0">EXTENDED_BOOT_SIG</a> = 0X29;
<a name="l00901"></a>00901 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00909"></a>00909 <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structpartition_table.html" title="MBR partition table entry.">partitionTable</a> {
<a name="l00915"></a>00915   uint8_t  <a class="code" href="structpartition_table.html#ad2acb7fab9ef33a6f00c834401250229">boot</a>;
<a name="l00920"></a>00920   uint8_t  <a class="code" href="structpartition_table.html#ab27b713d70d01c43e31fc67e08f876bf">beginHead</a>;
<a name="l00925"></a>00925   <span class="keywordtype">unsigned</span> <a class="code" href="structpartition_table.html#a3ef026d5e8a9c697e414cf773b129db4">beginSector</a> : 6;
<a name="l00927"></a>00927   <span class="keywordtype">unsigned</span> <a class="code" href="structpartition_table.html#aae20759e6c6dbfa51368964f8fe095c7">beginCylinderHigh</a> : 2;
<a name="l00932"></a>00932   uint8_t  <a class="code" href="structpartition_table.html#afefdee23280567f8434f9c31610e0a3b">beginCylinderLow</a>;
<a name="l00937"></a>00937   uint8_t  <a class="code" href="structpartition_table.html#a1d127017fb298b889f4ba24752d08b8e">type</a>;
<a name="l00942"></a>00942   uint8_t  <a class="code" href="structpartition_table.html#a248e6a8c42872744129b8b85a864a7a6">endHead</a>;
<a name="l00947"></a>00947   <span class="keywordtype">unsigned</span> <a class="code" href="structpartition_table.html#a1412f3c5116885eb7d4a047e432c9cdd">endSector</a> : 6;
<a name="l00949"></a>00949   <span class="keywordtype">unsigned</span> <a class="code" href="structpartition_table.html#adeccbdcad0d989d1e33a07b435ab7300">endCylinderHigh</a> : 2;
<a name="l00954"></a>00954   uint8_t  <a class="code" href="structpartition_table.html#a3eb4b87675075500899edbb9296e0435">endCylinderLow</a>;
<a name="l00956"></a>00956   uint32_t <a class="code" href="structpartition_table.html#a5951cd74127d45180071909972899c0e">firstSector</a>;
<a name="l00958"></a>00958   uint32_t <a class="code" href="structpartition_table.html#ab3559f69d4a46a945bd4c037070585f2">totalSectors</a>;
<a name="l00959"></a>00959 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l00961"></a><a class="code" href="_sd_fat_8h.html#a37251e7d5c69a159be727a3fc8c9d0e6">00961</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpartition_table.html" title="MBR partition table entry.">partitionTable</a> <a class="code" href="structpartition_table.html" title="MBR partition table entry.">part_t</a>;
<a name="l00962"></a>00962 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00970"></a>00970 <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structmaster_boot_record.html" title="Master Boot Record.">masterBootRecord</a> {
<a name="l00972"></a>00972   uint8_t  <a class="code" href="structmaster_boot_record.html#aa0506841535b45b93c3f51da3e662158">codeArea</a>[440];
<a name="l00974"></a>00974   uint32_t <a class="code" href="structmaster_boot_record.html#a6a40348b3b308847ba21a75829d91871">diskSignature</a>;
<a name="l00976"></a>00976   uint16_t <a class="code" href="structmaster_boot_record.html#aefe56bef1bc942c24bc7eefc4a7aefcc">usuallyZero</a>;
<a name="l00978"></a>00978   <a class="code" href="structpartition_table.html" title="MBR partition table entry.">part_t</a>   <a class="code" href="structmaster_boot_record.html#a524278b18c83dccc3da5eaab41601a0d">part</a>[4];
<a name="l00980"></a>00980   uint8_t  <a class="code" href="structmaster_boot_record.html#aa5633d8ea0049be26315e7627e32bb4e">mbrSig0</a>;
<a name="l00982"></a>00982   uint8_t  <a class="code" href="structmaster_boot_record.html#af106928fafe93a641c06cfb87b0d24e3">mbrSig1</a>;
<a name="l00983"></a>00983 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l00985"></a><a class="code" href="_sd_fat_8h.html#a7c429e5097f101c8c97663d6c4155bd9">00985</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmaster_boot_record.html" title="Master Boot Record.">masterBootRecord</a> <a class="code" href="structmaster_boot_record.html" title="Master Boot Record.">mbr_t</a>;
<a name="l00986"></a>00986 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00993"></a><a class="code" href="structfat__boot.html">00993</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structfat__boot.html" title="Boot sector for a FAT12/FAT16 volume.">fat_boot</a> {
<a name="l00999"></a><a class="code" href="structfat__boot.html#a61b95cffdd449d10352cfd0288b23287">00999</a>   uint8_t <a class="code" href="structfat__boot.html#a61b95cffdd449d10352cfd0288b23287">jump</a>[3];
<a name="l01004"></a><a class="code" href="structfat__boot.html#adff248465625d1fa3583bfcf2838620d">01004</a>   <span class="keywordtype">char</span>    <a class="code" href="structfat__boot.html#adff248465625d1fa3583bfcf2838620d">oemId</a>[8];
<a name="l01010"></a><a class="code" href="structfat__boot.html#adb2ddeae74baf681103d21d724814a63">01010</a>   uint16_t <a class="code" href="structfat__boot.html#adb2ddeae74baf681103d21d724814a63">bytesPerSector</a>;
<a name="l01016"></a><a class="code" href="structfat__boot.html#a3ce07376c286acd8393a18a32d7ca4c0">01016</a>   uint8_t  <a class="code" href="structfat__boot.html#a3ce07376c286acd8393a18a32d7ca4c0">sectorsPerCluster</a>;
<a name="l01021"></a><a class="code" href="structfat__boot.html#a16c854faf567331bbbfb383e6c8df6f5">01021</a>   uint16_t <a class="code" href="structfat__boot.html#a16c854faf567331bbbfb383e6c8df6f5">reservedSectorCount</a>;
<a name="l01026"></a><a class="code" href="structfat__boot.html#a624e9eb125b4fc8aeaebcccf79e17aa8">01026</a>   uint8_t  <a class="code" href="structfat__boot.html#a624e9eb125b4fc8aeaebcccf79e17aa8">fatCount</a>;
<a name="l01035"></a><a class="code" href="structfat__boot.html#aabe25e54b9c06a9a7393fc6c475d9fa1">01035</a>   uint16_t <a class="code" href="structfat__boot.html#aabe25e54b9c06a9a7393fc6c475d9fa1">rootDirEntryCount</a>;
<a name="l01045"></a><a class="code" href="structfat__boot.html#ad717f5b9af13f8ec9d0d6d1337174dfa">01045</a>   uint16_t <a class="code" href="structfat__boot.html#ad717f5b9af13f8ec9d0d6d1337174dfa">totalSectors16</a>;
<a name="l01052"></a><a class="code" href="structfat__boot.html#ab88738f9cb91c882cb91d5e83a19a73f">01052</a>   uint8_t  <a class="code" href="structfat__boot.html#ab88738f9cb91c882cb91d5e83a19a73f">mediaType</a>;
<a name="l01058"></a><a class="code" href="structfat__boot.html#abf85d1c57b01c8901a0cdcd0ac1babc2">01058</a>   uint16_t <a class="code" href="structfat__boot.html#abf85d1c57b01c8901a0cdcd0ac1babc2">sectorsPerFat16</a>;
<a name="l01060"></a><a class="code" href="structfat__boot.html#a42886f9109ee1759d5972e871f0689a8">01060</a>   uint16_t <a class="code" href="structfat__boot.html#a42886f9109ee1759d5972e871f0689a8">sectorsPerTrack</a>;
<a name="l01062"></a><a class="code" href="structfat__boot.html#a57cb7e16b9969fa87c9f1ca43a87d217">01062</a>   uint16_t <a class="code" href="structfat__boot.html#a57cb7e16b9969fa87c9f1ca43a87d217">headCount</a>;
<a name="l01068"></a><a class="code" href="structfat__boot.html#a454fd6cc3f063c86b7fe65c367da7cdd">01068</a>   uint32_t <a class="code" href="structfat__boot.html#a454fd6cc3f063c86b7fe65c367da7cdd">hidddenSectors</a>;
<a name="l01075"></a><a class="code" href="structfat__boot.html#a64d5902f9e900ecc745b1c0b325d875f">01075</a>   uint32_t <a class="code" href="structfat__boot.html#a64d5902f9e900ecc745b1c0b325d875f">totalSectors32</a>;
<a name="l01084"></a><a class="code" href="structfat__boot.html#aa7c65fdb4f759fca094105d1c870bcb2">01084</a>   uint8_t  <a class="code" href="structfat__boot.html#aa7c65fdb4f759fca094105d1c870bcb2">driveNumber</a>;
<a name="l01086"></a><a class="code" href="structfat__boot.html#a2a2556147677ece60b8aadf4a0d608ed">01086</a>   uint8_t  <a class="code" href="structfat__boot.html#a2a2556147677ece60b8aadf4a0d608ed">reserved1</a>;
<a name="l01088"></a><a class="code" href="structfat__boot.html#acc4a4e4c22b630d12c1b2c2b8c7eb366">01088</a>   uint8_t  <a class="code" href="structfat__boot.html#acc4a4e4c22b630d12c1b2c2b8c7eb366">bootSignature</a>;
<a name="l01094"></a><a class="code" href="structfat__boot.html#a7c9ffcee12051cefe1724e8024af25f8">01094</a>   uint32_t <a class="code" href="structfat__boot.html#a7c9ffcee12051cefe1724e8024af25f8">volumeSerialNumber</a>;
<a name="l01099"></a><a class="code" href="structfat__boot.html#a253960050a38d2bfb2f57e86769aca62">01099</a>   <span class="keywordtype">char</span>     <a class="code" href="structfat__boot.html#a253960050a38d2bfb2f57e86769aca62">volumeLabel</a>[11];
<a name="l01104"></a><a class="code" href="structfat__boot.html#adf80bb044ef7c8ac6d371268aa338e23">01104</a>   <span class="keywordtype">char</span>     <a class="code" href="structfat__boot.html#adf80bb044ef7c8ac6d371268aa338e23">fileSystemType</a>[8];
<a name="l01106"></a><a class="code" href="structfat__boot.html#a3a3b1f80267552c92749bd86827821a2">01106</a>   uint8_t  <a class="code" href="structfat__boot.html#a3a3b1f80267552c92749bd86827821a2">bootCode</a>[448];
<a name="l01108"></a><a class="code" href="structfat__boot.html#abdaf2cc75b74800944ede557442ca5bd">01108</a>   uint8_t  <a class="code" href="structfat__boot.html#abdaf2cc75b74800944ede557442ca5bd">bootSectorSig0</a>;
<a name="l01110"></a><a class="code" href="structfat__boot.html#a44983e94ecddbdcb7ab691e493a13d94">01110</a>   uint8_t  <a class="code" href="structfat__boot.html#a44983e94ecddbdcb7ab691e493a13d94">bootSectorSig1</a>;
<a name="l01111"></a>01111 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01113"></a><a class="code" href="_sd_fat_8h.html#aedac4595ee08198da26c14b9891a07d5">01113</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structfat__boot.html" title="Boot sector for a FAT12/FAT16 volume.">fat_boot</a> <a class="code" href="structfat__boot.html" title="Boot sector for a FAT12/FAT16 volume.">fat_boot_t</a>;
<a name="l01114"></a>01114 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01121"></a><a class="code" href="structfat32__boot.html">01121</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structfat32__boot.html" title="Boot sector for a FAT32 volume.">fat32_boot</a> {
<a name="l01127"></a><a class="code" href="structfat32__boot.html#a61b95cffdd449d10352cfd0288b23287">01127</a>   uint8_t <a class="code" href="structfat32__boot.html#a61b95cffdd449d10352cfd0288b23287">jump</a>[3];
<a name="l01132"></a><a class="code" href="structfat32__boot.html#adff248465625d1fa3583bfcf2838620d">01132</a>   <span class="keywordtype">char</span>    <a class="code" href="structfat32__boot.html#adff248465625d1fa3583bfcf2838620d">oemId</a>[8];
<a name="l01138"></a><a class="code" href="structfat32__boot.html#adb2ddeae74baf681103d21d724814a63">01138</a>   uint16_t <a class="code" href="structfat32__boot.html#adb2ddeae74baf681103d21d724814a63">bytesPerSector</a>;
<a name="l01144"></a><a class="code" href="structfat32__boot.html#a3ce07376c286acd8393a18a32d7ca4c0">01144</a>   uint8_t  <a class="code" href="structfat32__boot.html#a3ce07376c286acd8393a18a32d7ca4c0">sectorsPerCluster</a>;
<a name="l01149"></a><a class="code" href="structfat32__boot.html#a16c854faf567331bbbfb383e6c8df6f5">01149</a>   uint16_t <a class="code" href="structfat32__boot.html#a16c854faf567331bbbfb383e6c8df6f5">reservedSectorCount</a>;
<a name="l01154"></a><a class="code" href="structfat32__boot.html#a624e9eb125b4fc8aeaebcccf79e17aa8">01154</a>   uint8_t  <a class="code" href="structfat32__boot.html#a624e9eb125b4fc8aeaebcccf79e17aa8">fatCount</a>;
<a name="l01158"></a><a class="code" href="structfat32__boot.html#aabe25e54b9c06a9a7393fc6c475d9fa1">01158</a>   uint16_t <a class="code" href="structfat32__boot.html#aabe25e54b9c06a9a7393fc6c475d9fa1">rootDirEntryCount</a>;
<a name="l01162"></a><a class="code" href="structfat32__boot.html#ad717f5b9af13f8ec9d0d6d1337174dfa">01162</a>   uint16_t <a class="code" href="structfat32__boot.html#ad717f5b9af13f8ec9d0d6d1337174dfa">totalSectors16</a>;
<a name="l01169"></a><a class="code" href="structfat32__boot.html#ab88738f9cb91c882cb91d5e83a19a73f">01169</a>   uint8_t  <a class="code" href="structfat32__boot.html#ab88738f9cb91c882cb91d5e83a19a73f">mediaType</a>;
<a name="l01174"></a><a class="code" href="structfat32__boot.html#abf85d1c57b01c8901a0cdcd0ac1babc2">01174</a>   uint16_t <a class="code" href="structfat32__boot.html#abf85d1c57b01c8901a0cdcd0ac1babc2">sectorsPerFat16</a>;
<a name="l01176"></a><a class="code" href="structfat32__boot.html#a42886f9109ee1759d5972e871f0689a8">01176</a>   uint16_t <a class="code" href="structfat32__boot.html#a42886f9109ee1759d5972e871f0689a8">sectorsPerTrack</a>;
<a name="l01178"></a><a class="code" href="structfat32__boot.html#a57cb7e16b9969fa87c9f1ca43a87d217">01178</a>   uint16_t <a class="code" href="structfat32__boot.html#a57cb7e16b9969fa87c9f1ca43a87d217">headCount</a>;
<a name="l01184"></a><a class="code" href="structfat32__boot.html#a454fd6cc3f063c86b7fe65c367da7cdd">01184</a>   uint32_t <a class="code" href="structfat32__boot.html#a454fd6cc3f063c86b7fe65c367da7cdd">hidddenSectors</a>;
<a name="l01188"></a><a class="code" href="structfat32__boot.html#a64d5902f9e900ecc745b1c0b325d875f">01188</a>   uint32_t <a class="code" href="structfat32__boot.html#a64d5902f9e900ecc745b1c0b325d875f">totalSectors32</a>;
<a name="l01192"></a><a class="code" href="structfat32__boot.html#a687653b3b71ab0de1f27f8ab8f331a1c">01192</a>   uint32_t <a class="code" href="structfat32__boot.html#a687653b3b71ab0de1f27f8ab8f331a1c">sectorsPerFat32</a>;
<a name="l01204"></a><a class="code" href="structfat32__boot.html#a4f864cefb7f1b004d5739ffab9a65ae1">01204</a>   uint16_t <a class="code" href="structfat32__boot.html#a4f864cefb7f1b004d5739ffab9a65ae1">fat32Flags</a>;
<a name="l01209"></a><a class="code" href="structfat32__boot.html#a8f27235fa3dee48a4b4e099135fc81d6">01209</a>   uint16_t <a class="code" href="structfat32__boot.html#a8f27235fa3dee48a4b4e099135fc81d6">fat32Version</a>;
<a name="l01214"></a><a class="code" href="structfat32__boot.html#a58249ed4ed0f92d5768f2342f248af82">01214</a>   uint32_t <a class="code" href="structfat32__boot.html#a58249ed4ed0f92d5768f2342f248af82">fat32RootCluster</a>;
<a name="l01219"></a><a class="code" href="structfat32__boot.html#aad3222ea255af06d09734e96a93c82ed">01219</a>   uint16_t <a class="code" href="structfat32__boot.html#aad3222ea255af06d09734e96a93c82ed">fat32FSInfo</a>;
<a name="l01225"></a><a class="code" href="structfat32__boot.html#a1914baf34756efd18072059dccfcf40f">01225</a>   uint16_t <a class="code" href="structfat32__boot.html#a1914baf34756efd18072059dccfcf40f">fat32BackBootBlock</a>;
<a name="l01230"></a><a class="code" href="structfat32__boot.html#ae31dc7ad96aec8e0d184fd7e5a97f30d">01230</a>   uint8_t  <a class="code" href="structfat32__boot.html#ae31dc7ad96aec8e0d184fd7e5a97f30d">fat32Reserved</a>[12];
<a name="l01239"></a><a class="code" href="structfat32__boot.html#aa7c65fdb4f759fca094105d1c870bcb2">01239</a>   uint8_t  <a class="code" href="structfat32__boot.html#aa7c65fdb4f759fca094105d1c870bcb2">driveNumber</a>;
<a name="l01241"></a><a class="code" href="structfat32__boot.html#a2a2556147677ece60b8aadf4a0d608ed">01241</a>   uint8_t  <a class="code" href="structfat32__boot.html#a2a2556147677ece60b8aadf4a0d608ed">reserved1</a>;
<a name="l01243"></a><a class="code" href="structfat32__boot.html#acc4a4e4c22b630d12c1b2c2b8c7eb366">01243</a>   uint8_t  <a class="code" href="structfat32__boot.html#acc4a4e4c22b630d12c1b2c2b8c7eb366">bootSignature</a>;
<a name="l01249"></a><a class="code" href="structfat32__boot.html#a7c9ffcee12051cefe1724e8024af25f8">01249</a>   uint32_t <a class="code" href="structfat32__boot.html#a7c9ffcee12051cefe1724e8024af25f8">volumeSerialNumber</a>;
<a name="l01254"></a><a class="code" href="structfat32__boot.html#a253960050a38d2bfb2f57e86769aca62">01254</a>   <span class="keywordtype">char</span>     <a class="code" href="structfat32__boot.html#a253960050a38d2bfb2f57e86769aca62">volumeLabel</a>[11];
<a name="l01258"></a><a class="code" href="structfat32__boot.html#adf80bb044ef7c8ac6d371268aa338e23">01258</a>   <span class="keywordtype">char</span>     <a class="code" href="structfat32__boot.html#adf80bb044ef7c8ac6d371268aa338e23">fileSystemType</a>[8];
<a name="l01260"></a><a class="code" href="structfat32__boot.html#a5d683c906867f4e0122d2ce3462de292">01260</a>   uint8_t  <a class="code" href="structfat32__boot.html#a5d683c906867f4e0122d2ce3462de292">bootCode</a>[420];
<a name="l01262"></a><a class="code" href="structfat32__boot.html#abdaf2cc75b74800944ede557442ca5bd">01262</a>   uint8_t  <a class="code" href="structfat32__boot.html#abdaf2cc75b74800944ede557442ca5bd">bootSectorSig0</a>;
<a name="l01264"></a><a class="code" href="structfat32__boot.html#a44983e94ecddbdcb7ab691e493a13d94">01264</a>   uint8_t  <a class="code" href="structfat32__boot.html#a44983e94ecddbdcb7ab691e493a13d94">bootSectorSig1</a>;
<a name="l01265"></a>01265 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01267"></a><a class="code" href="_sd_fat_8h.html#a38fa081d004647a828095d31b07ec491">01267</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structfat32__boot.html" title="Boot sector for a FAT32 volume.">fat32_boot</a> <a class="code" href="structfat32__boot.html" title="Boot sector for a FAT32 volume.">fat32_boot_t</a>;
<a name="l01268"></a>01268 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01270"></a><a class="code" href="_sd_fat_8h.html#ac569b1b465f941aaa41a17d270e278df">01270</a> <span class="comment"></span>uint32_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac569b1b465f941aaa41a17d270e278df">FSINFO_LEAD_SIG</a> = 0x41615252;
<a name="l01272"></a><a class="code" href="_sd_fat_8h.html#ab777b40d12137b9ed073b3bb578703d0">01272</a> uint32_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ab777b40d12137b9ed073b3bb578703d0">FSINFO_STRUCT_SIG</a> = 0x61417272;
<a name="l01279"></a><a class="code" href="structfat32__fsinfo.html">01279</a> <span class="keyword">struct </span><a class="code" href="structfat32__fsinfo.html" title="FSINFO sector for a FAT32 volume.">fat32_fsinfo</a> {
<a name="l01281"></a><a class="code" href="structfat32__fsinfo.html#a19196eeae2525130bdb0d39607860743">01281</a>   uint32_t  <a class="code" href="structfat32__fsinfo.html#a19196eeae2525130bdb0d39607860743">leadSignature</a>;
<a name="l01283"></a><a class="code" href="structfat32__fsinfo.html#aed41fe36034f1fcda738da60943924a6">01283</a>   uint8_t  <a class="code" href="structfat32__fsinfo.html#aed41fe36034f1fcda738da60943924a6">reserved1</a>[480];
<a name="l01285"></a><a class="code" href="structfat32__fsinfo.html#a31ea8ae6a8d32f61dd576d0d4921f015">01285</a>   uint32_t  <a class="code" href="structfat32__fsinfo.html#a31ea8ae6a8d32f61dd576d0d4921f015">structSignature</a>;
<a name="l01293"></a><a class="code" href="structfat32__fsinfo.html#af5d9e0aff08147617a09dc19d207eafe">01293</a>   uint32_t <a class="code" href="structfat32__fsinfo.html#af5d9e0aff08147617a09dc19d207eafe">freeCount</a>;
<a name="l01300"></a><a class="code" href="structfat32__fsinfo.html#a456cdbc01678df5d05eabb80f5aac9b0">01300</a>   uint32_t <a class="code" href="structfat32__fsinfo.html#a456cdbc01678df5d05eabb80f5aac9b0">nextFree</a>;
<a name="l01302"></a><a class="code" href="structfat32__fsinfo.html#af6dc8e21f5c1ca5ca997fc835808802c">01302</a>   uint8_t  <a class="code" href="structfat32__fsinfo.html#af6dc8e21f5c1ca5ca997fc835808802c">reserved2</a>[12];
<a name="l01304"></a><a class="code" href="structfat32__fsinfo.html#a89944902cc4effcd8568575786c3a084">01304</a>   uint8_t  <a class="code" href="structfat32__fsinfo.html#a89944902cc4effcd8568575786c3a084">tailSignature</a>[4];
<a name="l01305"></a>01305 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01307"></a><a class="code" href="_sd_fat_8h.html#a6030ed0fce3a819326a2548407fc8556">01307</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structfat32__fsinfo.html" title="FSINFO sector for a FAT32 volume.">fat32_fsinfo</a> <a class="code" href="structfat32__fsinfo.html" title="FSINFO sector for a FAT32 volume.">fat32_fsinfo_t</a>;
<a name="l01308"></a>01308 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01309"></a>01309 <span class="comment">// End Of Chain values for FAT entries</span>
<a name="l01311"></a><a class="code" href="_sd_fat_8h.html#a5beb263a9cb768739f5ddb476ede6690">01311</a> <span class="comment"></span>uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5beb263a9cb768739f5ddb476ede6690">FAT12EOC</a> = 0XFFF;
<a name="l01313"></a><a class="code" href="_sd_fat_8h.html#af1754604787f709306101dcc04391ff2">01313</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#af1754604787f709306101dcc04391ff2">FAT12EOC_MIN</a> = 0XFF8;
<a name="l01315"></a><a class="code" href="_sd_fat_8h.html#a47b11a71cedad5402613ab2aae827c99">01315</a> uint16_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a47b11a71cedad5402613ab2aae827c99">FAT16EOC</a> = 0XFFFF;
<a name="l01317"></a><a class="code" href="_sd_fat_8h.html#a79b2cefbcfdbf3507fe0496804541b0d">01317</a> uint16_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a79b2cefbcfdbf3507fe0496804541b0d">FAT16EOC_MIN</a> = 0XFFF8;
<a name="l01319"></a><a class="code" href="_sd_fat_8h.html#ac213f2ce8eaa53f7d98424b300038dfd">01319</a> uint32_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#ac213f2ce8eaa53f7d98424b300038dfd">FAT32EOC</a> = 0X0FFFFFFF;
<a name="l01321"></a><a class="code" href="_sd_fat_8h.html#af5bcc97de8cc4956435d06349d6e714b">01321</a> uint32_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#af5bcc97de8cc4956435d06349d6e714b">FAT32EOC_MIN</a> = 0X0FFFFFF8;
<a name="l01323"></a><a class="code" href="_sd_fat_8h.html#a00e6cb52e814024fc23971c43f6e257a">01323</a> uint32_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a00e6cb52e814024fc23971c43f6e257a">FAT32MASK</a> = 0X0FFFFFFF;
<a name="l01324"></a>01324 
<a name="l01325"></a>01325 <span class="comment">// Reuse directory entries from deleted files</span>
<a name="l01326"></a><a class="code" href="_sd_fat_8h.html#a91d7d33ce23ec0b34dcc1f2f638887f3">01326</a> <span class="preprocessor">#define SD_CARD_REUSE_FAT_ENTRIES true</span>
<a name="l01327"></a>01327 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01358"></a>01358 <span class="comment"></span><span class="keyword">struct </span><a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">directoryEntry</a> {
<a name="l01364"></a>01364   uint8_t  <a class="code" href="structdirectory_entry.html#a03538c3434c511f082c32cda04754e0c">name</a>[11];
<a name="l01371"></a>01371   uint8_t  <a class="code" href="structdirectory_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a>;
<a name="l01376"></a>01376   uint8_t  <a class="code" href="structdirectory_entry.html#a937b2d2e4b78ddf9e42b19c754e4f31a">reservedNT</a>;
<a name="l01382"></a>01382   uint8_t  <a class="code" href="structdirectory_entry.html#a088ac767e59feb38599e0a53e6aacb82">creationTimeTenths</a>;
<a name="l01384"></a>01384   uint16_t <a class="code" href="structdirectory_entry.html#a2b2b18a3fb988470278b1217abe946ab">creationTime</a>;
<a name="l01386"></a>01386   uint16_t <a class="code" href="structdirectory_entry.html#ab00be6268bf4c4f4b6014f056e27ba45">creationDate</a>;
<a name="l01392"></a>01392   uint16_t <a class="code" href="structdirectory_entry.html#a5635857642ec25e070355257115dafd1">lastAccessDate</a>;
<a name="l01397"></a>01397   uint16_t <a class="code" href="structdirectory_entry.html#ad6224dfa27a1c558703f158e93ceafe0">firstClusterHigh</a>;
<a name="l01399"></a>01399   uint16_t <a class="code" href="structdirectory_entry.html#ab140bb773b2ff0ddf7199efc083ce037">lastWriteTime</a>;
<a name="l01401"></a>01401   uint16_t <a class="code" href="structdirectory_entry.html#a26f462d6e4410d502149973ee6c216fd">lastWriteDate</a>;
<a name="l01403"></a>01403   uint16_t <a class="code" href="structdirectory_entry.html#a3a4f70fb49494208d7eb349969a8acaa">firstClusterLow</a>;
<a name="l01405"></a>01405   uint32_t <a class="code" href="structdirectory_entry.html#a48f46ad02b77a00b795d15626ba1d42e">fileSize</a>;
<a name="l01406"></a>01406 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01407"></a>01407 
<a name="l01408"></a>01408 <span class="comment">// LONG FILENAME FAT ENTRY</span>
<a name="l01409"></a><a class="code" href="structdirectory_v_f_a_t_entry.html">01409</a> <span class="keyword">struct </span><a class="code" href="structdirectory_v_f_a_t_entry.html">directoryVFATEntry</a> {
<a name="l01415"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a82ca2a53aefca9af4ff51145f9691b1f">01415</a>   uint8_t  <a class="code" href="structdirectory_v_f_a_t_entry.html#a82ca2a53aefca9af4ff51145f9691b1f">sequenceNumber</a>;
<a name="l01417"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a5838c0c2c16393596822649d9b9d9d8b">01417</a>   uint16_t <a class="code" href="structdirectory_v_f_a_t_entry.html#a5838c0c2c16393596822649d9b9d9d8b">name1</a>[5];<span class="comment">//UTF-16</span>
<a name="l01419"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a983149395439fbc9ca8497076b75fd6b">01419</a> <span class="comment"></span>  uint8_t  <a class="code" href="structdirectory_v_f_a_t_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a>;
<a name="l01421"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a937b2d2e4b78ddf9e42b19c754e4f31a">01421</a>   uint8_t  <a class="code" href="structdirectory_v_f_a_t_entry.html#a937b2d2e4b78ddf9e42b19c754e4f31a">reservedNT</a>;
<a name="l01423"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a59eac9627282a484fbaf0aa7aa3b8a9a">01423</a>   uint8_t  <a class="code" href="structdirectory_v_f_a_t_entry.html#a59eac9627282a484fbaf0aa7aa3b8a9a">checksum</a>;
<a name="l01425"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a5842149c75fb6d31bf351993341cf514">01425</a>   uint16_t <a class="code" href="structdirectory_v_f_a_t_entry.html#a5842149c75fb6d31bf351993341cf514">name2</a>[6];<span class="comment">//UTF-16</span>
<a name="l01427"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#a3a4f70fb49494208d7eb349969a8acaa">01427</a> <span class="comment"></span>  uint16_t <a class="code" href="structdirectory_v_f_a_t_entry.html#a3a4f70fb49494208d7eb349969a8acaa">firstClusterLow</a>;
<a name="l01429"></a><a class="code" href="structdirectory_v_f_a_t_entry.html#aed3846d60b6d4d21c4efa6c40a37a873">01429</a>   uint16_t <a class="code" href="structdirectory_v_f_a_t_entry.html#aed3846d60b6d4d21c4efa6c40a37a873">name3</a>[2];<span class="comment">//UTF-16</span>
<a name="l01430"></a>01430 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01431"></a><a class="code" href="_sd_fat_8h.html#ac6971dadcb93615aead14e8614a704ba">01431</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdirectory_v_f_a_t_entry.html">directoryVFATEntry</a> <a class="code" href="structdirectory_v_f_a_t_entry.html">vfat_t</a>;
<a name="l01432"></a>01432 
<a name="l01433"></a>01433 
<a name="l01434"></a>01434 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01435"></a>01435 <span class="comment">// Definitions for directory entries</span>
<a name="l01436"></a>01436 <span class="comment">//</span>
<a name="l01438"></a><a class="code" href="_sd_fat_8h.html#a803db59d4e16a0c54a647afc6a7954e3">01438</a> <span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">directoryEntry</a> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>;
<a name="l01440"></a><a class="code" href="_sd_fat_8h.html#a27c8cd1e50f71974c9d98a868cfc4c77">01440</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a27c8cd1e50f71974c9d98a868cfc4c77">DIR_NAME_0XE5</a> = 0X05;
<a name="l01442"></a><a class="code" href="_sd_fat_8h.html#a5de4ada3536d89559f6433e835e311da">01442</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a5de4ada3536d89559f6433e835e311da">DIR_NAME_DELETED</a> = 0XE5;
<a name="l01444"></a><a class="code" href="_sd_fat_8h.html#a23b2e4d06e245c778f4c52909cf97c76">01444</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a23b2e4d06e245c778f4c52909cf97c76">DIR_NAME_FREE</a> = 0X00;
<a name="l01446"></a><a class="code" href="_sd_fat_8h.html#abff82a1fd65417a032777e0821821640">01446</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#abff82a1fd65417a032777e0821821640">DIR_ATT_READ_ONLY</a> = 0X01;
<a name="l01448"></a><a class="code" href="_sd_fat_8h.html#a3a41f54f933a4d34b1502321ab9da5ff">01448</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a3a41f54f933a4d34b1502321ab9da5ff">DIR_ATT_HIDDEN</a> = 0X02;
<a name="l01450"></a><a class="code" href="_sd_fat_8h.html#ae89bc34164e7318b3d3169ff290c8d70">01450</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#ae89bc34164e7318b3d3169ff290c8d70">DIR_ATT_SYSTEM</a> = 0X04;
<a name="l01452"></a><a class="code" href="_sd_fat_8h.html#af50cf547300f2cc5d33e7ab457b5a200">01452</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#af50cf547300f2cc5d33e7ab457b5a200">DIR_ATT_VOLUME_ID</a> = 0X08;
<a name="l01454"></a><a class="code" href="_sd_fat_8h.html#a3f9e7ceac3e0a9aebead998e88349139">01454</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a3f9e7ceac3e0a9aebead998e88349139">DIR_ATT_DIRECTORY</a> = 0X10;
<a name="l01456"></a><a class="code" href="_sd_fat_8h.html#a7144738c367c16e672b3e48962bc7dda">01456</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a7144738c367c16e672b3e48962bc7dda">DIR_ATT_ARCHIVE</a> = 0X20;
<a name="l01459"></a><a class="code" href="_sd_fat_8h.html#a0d3f6fbbd34126b2d5563bba65220985">01459</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a0d3f6fbbd34126b2d5563bba65220985">DIR_ATT_LONG_NAME</a> = 0X0F;
<a name="l01461"></a><a class="code" href="_sd_fat_8h.html#a0aa5725dd4916058f0c6c06b09f83059">01461</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a0aa5725dd4916058f0c6c06b09f83059">DIR_ATT_LONG_NAME_MASK</a> = 0X3F;
<a name="l01463"></a><a class="code" href="_sd_fat_8h.html#ad131502987658581d57cc18328d18aa5">01463</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#ad131502987658581d57cc18328d18aa5">DIR_ATT_DEFINED_BITS</a> = 0X3F;
<a name="l01469"></a><a class="code" href="_sd_fat_8h.html#a504c3d996b412f386becc27a8c49cd2c">01469</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a504c3d996b412f386becc27a8c49cd2c">DIR_IS_LONG_NAME</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir) {
<a name="l01470"></a>01470   <span class="keywordflow">return</span> (dir-&gt;<a class="code" href="structdirectory_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a> &amp; DIR_ATT_LONG_NAME_MASK) == <a class="code" href="_fat_structs_8h.html#a0d3f6fbbd34126b2d5563bba65220985">DIR_ATT_LONG_NAME</a>;
<a name="l01471"></a>01471 }
<a name="l01473"></a><a class="code" href="_sd_fat_8h.html#a40ed222fdb5b5c6b2f04268ab0ce20ca">01473</a> uint8_t <span class="keyword">const</span> <a class="code" href="_fat_structs_8h.html#a40ed222fdb5b5c6b2f04268ab0ce20ca">DIR_ATT_FILE_TYPE_MASK</a> = (DIR_ATT_VOLUME_ID | <a class="code" href="_fat_structs_8h.html#a3f9e7ceac3e0a9aebead998e88349139">DIR_ATT_DIRECTORY</a>);
<a name="l01479"></a><a class="code" href="_sd_fat_8h.html#a5ce8bde4d6ff3950df951e84c7bb8d58">01479</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a5ce8bde4d6ff3950df951e84c7bb8d58">DIR_IS_FILE</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir) {
<a name="l01480"></a>01480   <span class="keywordflow">return</span> (dir-&gt;<a class="code" href="structdirectory_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a> &amp; DIR_ATT_FILE_TYPE_MASK) == 0;
<a name="l01481"></a>01481 }
<a name="l01487"></a><a class="code" href="_sd_fat_8h.html#ace8ed88fcb41afc4d2fe0eabf96e71c6">01487</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#ace8ed88fcb41afc4d2fe0eabf96e71c6">DIR_IS_SUBDIR</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir) {
<a name="l01488"></a>01488   <span class="keywordflow">return</span> (dir-&gt;<a class="code" href="structdirectory_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a> &amp; DIR_ATT_FILE_TYPE_MASK) == <a class="code" href="_fat_structs_8h.html#a3f9e7ceac3e0a9aebead998e88349139">DIR_ATT_DIRECTORY</a>;
<a name="l01489"></a>01489 }
<a name="l01495"></a><a class="code" href="_sd_fat_8h.html#a9d99b04fa090825a9b9c2468fa81e627">01495</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a9d99b04fa090825a9b9c2468fa81e627">DIR_IS_FILE_OR_SUBDIR</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir) {
<a name="l01496"></a>01496   <span class="keywordflow">return</span> (dir-&gt;<a class="code" href="structdirectory_entry.html#a983149395439fbc9ca8497076b75fd6b">attributes</a> &amp; DIR_ATT_VOLUME_ID) == 0;
<a name="l01497"></a>01497 }
<a name="l01498"></a>01498 
<a name="l01499"></a>01499 <span class="comment">//==============================================================================</span>
<a name="l01500"></a>01500 <span class="comment">// SdVolume class</span>
<a name="l01504"></a><a class="code" href="unioncache__t.html">01504</a> <span class="comment"></span><span class="keyword">union </span><a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> {
<a name="l01506"></a><a class="code" href="unioncache__t.html#a3d71d6f767b902517cdc2a90b93d93ef">01506</a>   uint8_t  <a class="code" href="unioncache__t.html#a3d71d6f767b902517cdc2a90b93d93ef">data</a>[512];
<a name="l01508"></a><a class="code" href="unioncache__t.html#afbc2aee9e685ba2ec0b2a3e4cfbaefed">01508</a>   uint16_t <a class="code" href="unioncache__t.html#afbc2aee9e685ba2ec0b2a3e4cfbaefed">fat16</a>[256];
<a name="l01510"></a><a class="code" href="unioncache__t.html#ae7eca49d4c578b2d41d0ca2edfa65a11">01510</a>   uint32_t <a class="code" href="unioncache__t.html#ae7eca49d4c578b2d41d0ca2edfa65a11">fat32</a>[128];
<a name="l01512"></a><a class="code" href="unioncache__t.html#a6d2e24ad404317d817f7691495f9fa5b">01512</a>   <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>    <a class="code" href="unioncache__t.html#a6d2e24ad404317d817f7691495f9fa5b">dir</a>[16];
<a name="l01514"></a><a class="code" href="unioncache__t.html#ab085ad5652aa1dcd3d1c289126acb76e">01514</a>   <a class="code" href="structmaster_boot_record.html" title="Master Boot Record.">mbr_t</a>    <a class="code" href="unioncache__t.html#ab085ad5652aa1dcd3d1c289126acb76e">mbr</a>;
<a name="l01516"></a><a class="code" href="unioncache__t.html#af7dac1f364d9df2fab1065761459085a">01516</a>   <a class="code" href="structfat__boot.html" title="Boot sector for a FAT12/FAT16 volume.">fat_boot_t</a> <a class="code" href="unioncache__t.html#af7dac1f364d9df2fab1065761459085a">fbs</a>;
<a name="l01518"></a><a class="code" href="unioncache__t.html#a8a286df1a2c7d0d8c19f0bc92f4a37a0">01518</a>   <a class="code" href="structfat32__boot.html" title="Boot sector for a FAT32 volume.">fat32_boot_t</a> <a class="code" href="unioncache__t.html#a8a286df1a2c7d0d8c19f0bc92f4a37a0">fbs32</a>;
<a name="l01520"></a><a class="code" href="unioncache__t.html#ad5b9c8824c92202c5f442fd4da58772a">01520</a>   <a class="code" href="structfat32__fsinfo.html" title="FSINFO sector for a FAT32 volume.">fat32_fsinfo_t</a> <a class="code" href="unioncache__t.html#ad5b9c8824c92202c5f442fd4da58772a">fsinfo</a>;
<a name="l01521"></a>01521 } <a class="code" href="_sd_fat_8h.html#a6f596e0861a880c81c6b7006065d9eab">PACK</a>;
<a name="l01522"></a>01522 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01527"></a><a class="code" href="class_sd_volume.html">01527</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a> {
<a name="l01528"></a>01528  <span class="keyword">public</span>:
<a name="l01530"></a><a class="code" href="class_sd_volume.html#a8946a066e838455b790485f0f0b84a30">01530</a>   <a class="code" href="class_sd_volume.html#a8946a066e838455b790485f0f0b84a30">SdVolume</a>() : <a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">fatType_</a>(0) {}
<a name="l01535"></a><a class="code" href="class_sd_volume.html#aeb92f3b3c0e81e39f4dd123106f882a3">01535</a>   <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#aeb92f3b3c0e81e39f4dd123106f882a3">cacheClear</a>() {
<a name="l01536"></a>01536     <span class="keywordflow">if</span> (!<a class="code" href="class_sd_volume.html#a8897e95709ce46e8fa93674f509f9052">cacheSync</a>()) <span class="keywordflow">return</span> 0;
<a name="l01537"></a>01537     <a class="code" href="class_sd_volume.html#aff7820d33e7459503afe447ccd6fb867">cacheBlockNumber_</a> = 0XFFFFFFFF;
<a name="l01538"></a>01538     <span class="keywordflow">return</span> &amp;<a class="code" href="class_sd_volume.html#a2cc1a626151e1ae372cab5540c740a9c">cacheBuffer_</a>;
<a name="l01539"></a>01539   }
<a name="l01550"></a><a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">01550</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(<a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* dev) { <span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(dev, 1) ? <span class="keyword">true</span> : <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(dev, 0);}
<a name="l01551"></a>01551   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(<a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* dev, uint8_t part);
<a name="l01552"></a>01552 
<a name="l01553"></a>01553   <span class="comment">// inline functions that return volume info</span>
<a name="l01555"></a><a class="code" href="class_sd_volume.html#a8e6f1dd240dc430fdd1caf9742a56a7e">01555</a> <span class="comment"></span>  uint8_t <a class="code" href="class_sd_volume.html#a8e6f1dd240dc430fdd1caf9742a56a7e">blocksPerCluster</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a034c6d16845c12e97738ea5841cd69a9">blocksPerCluster_</a>;}
<a name="l01557"></a><a class="code" href="class_sd_volume.html#aa3b929c0b3148bcef7622028d6978b8c">01557</a>   uint32_t <a class="code" href="class_sd_volume.html#aa3b929c0b3148bcef7622028d6978b8c">blocksPerFat</a>()<span class="keyword">  const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#af1780962a496439ff8af6946df50c6fd">blocksPerFat_</a>;}
<a name="l01559"></a><a class="code" href="class_sd_volume.html#afcf5e92320a02c89758f5b07f8426d53">01559</a>   uint32_t <a class="code" href="class_sd_volume.html#afcf5e92320a02c89758f5b07f8426d53">clusterCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a903dab7955c7199a1b8dcbab453627de">clusterCount_</a>;}
<a name="l01561"></a><a class="code" href="class_sd_volume.html#aabed24c62fcedb89c4218b02c3763ae6">01561</a>   uint8_t <a class="code" href="class_sd_volume.html#aabed24c62fcedb89c4218b02c3763ae6">clusterSizeShift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a1756eeefb2456c7a5fe12139ca5e16ff">clusterSizeShift_</a>;}
<a name="l01563"></a><a class="code" href="class_sd_volume.html#ae95e3f4239d7ccb74d45a7e0cc4f499c">01563</a>   uint32_t <a class="code" href="class_sd_volume.html#ae95e3f4239d7ccb74d45a7e0cc4f499c">dataStartBlock</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a82c9b8371cb024e277704da07f3b21cf">dataStartBlock_</a>;}
<a name="l01565"></a><a class="code" href="class_sd_volume.html#a01935bdcf6a336f292102f7f23a2a38f">01565</a>   uint8_t <a class="code" href="class_sd_volume.html#a01935bdcf6a336f292102f7f23a2a38f">fatCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#ade92bd3ab96c8a11ae6e20139ed7bb8b">fatCount_</a>;}
<a name="l01567"></a><a class="code" href="class_sd_volume.html#a1ff040834f446f329e00cc71284d92fc">01567</a>   uint32_t <a class="code" href="class_sd_volume.html#a1ff040834f446f329e00cc71284d92fc">fatStartBlock</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a1eb3811c3747ab9c7cdecc5e19603522">fatStartBlock_</a>;}
<a name="l01569"></a><a class="code" href="class_sd_volume.html#ab14a92a01d77303d73fd5acd54ffbc16">01569</a>   uint8_t <a class="code" href="class_sd_volume.html#ab14a92a01d77303d73fd5acd54ffbc16">fatType</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">fatType_</a>;}
<a name="l01570"></a>01570   int32_t <a class="code" href="class_sd_volume.html#ae00ae9399f79dd2173e9957cf7e274f8">freeClusterCount</a>();
<a name="l01572"></a><a class="code" href="class_sd_volume.html#abc35aae90237c3a555574e94d5763f18">01572</a>   uint32_t <a class="code" href="class_sd_volume.html#abc35aae90237c3a555574e94d5763f18">rootDirEntryCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a557d01e917256bf2664edbe547b2c6f8">rootDirEntryCount_</a>;}
<a name="l01575"></a><a class="code" href="class_sd_volume.html#a9867c10a00c41a6c23471287be38ced3">01575</a>   uint32_t <a class="code" href="class_sd_volume.html#a9867c10a00c41a6c23471287be38ced3">rootDirStart</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a6c73bc9622358cc717df0290dcfc226c">rootDirStart_</a>;}
<a name="l01579"></a><a class="code" href="class_sd_volume.html#adf6dac7ae17bdf477d077482dc4d76d7">01579</a>   <a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* <a class="code" href="class_sd_volume.html#adf6dac7ae17bdf477d077482dc4d76d7">sdCard</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">sdCard_</a>;}
<a name="l01586"></a><a class="code" href="class_sd_volume.html#a6359ecffed0d28a726e355ea86089899">01586</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a6359ecffed0d28a726e355ea86089899">dbgFat</a>(uint32_t n, uint32_t* v) {<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#acab4b43b1042289f8b965c66116685c5">fatGet</a>(n, v);}
<a name="l01587"></a>01587 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01588"></a>01588  <span class="keyword">private</span>:
<a name="l01589"></a>01589   <span class="comment">// Allow SdBaseFile access to SdVolume private data.</span>
<a name="l01590"></a><a class="code" href="class_sd_volume.html#a05e466c179d34fec11c4406677fe0533">01590</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>;
<a name="l01591"></a>01591 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01592"></a><a class="code" href="class_sd_volume.html#a8971134e76e36a58bc13dd08960f7355">01592</a>   uint32_t <a class="code" href="class_sd_volume.html#a8971134e76e36a58bc13dd08960f7355">allocSearchStart_</a>;   <span class="comment">// start cluster for alloc search</span>
<a name="l01593"></a><a class="code" href="class_sd_volume.html#a034c6d16845c12e97738ea5841cd69a9">01593</a>   uint8_t <a class="code" href="class_sd_volume.html#a034c6d16845c12e97738ea5841cd69a9">blocksPerCluster_</a>;    <span class="comment">// cluster size in blocks</span>
<a name="l01594"></a><a class="code" href="class_sd_volume.html#af1780962a496439ff8af6946df50c6fd">01594</a>   uint32_t <a class="code" href="class_sd_volume.html#af1780962a496439ff8af6946df50c6fd">blocksPerFat_</a>;       <span class="comment">// FAT size in blocks</span>
<a name="l01595"></a><a class="code" href="class_sd_volume.html#a903dab7955c7199a1b8dcbab453627de">01595</a>   uint32_t <a class="code" href="class_sd_volume.html#a903dab7955c7199a1b8dcbab453627de">clusterCount_</a>;       <span class="comment">// clusters in one FAT</span>
<a name="l01596"></a><a class="code" href="class_sd_volume.html#a1756eeefb2456c7a5fe12139ca5e16ff">01596</a>   uint8_t <a class="code" href="class_sd_volume.html#a1756eeefb2456c7a5fe12139ca5e16ff">clusterSizeShift_</a>;    <span class="comment">// shift to convert cluster count to block count</span>
<a name="l01597"></a><a class="code" href="class_sd_volume.html#a82c9b8371cb024e277704da07f3b21cf">01597</a>   uint32_t <a class="code" href="class_sd_volume.html#a82c9b8371cb024e277704da07f3b21cf">dataStartBlock_</a>;     <span class="comment">// first data block number</span>
<a name="l01598"></a><a class="code" href="class_sd_volume.html#ade92bd3ab96c8a11ae6e20139ed7bb8b">01598</a>   uint8_t <a class="code" href="class_sd_volume.html#ade92bd3ab96c8a11ae6e20139ed7bb8b">fatCount_</a>;            <span class="comment">// number of FATs on volume</span>
<a name="l01599"></a><a class="code" href="class_sd_volume.html#a1eb3811c3747ab9c7cdecc5e19603522">01599</a>   uint32_t <a class="code" href="class_sd_volume.html#a1eb3811c3747ab9c7cdecc5e19603522">fatStartBlock_</a>;      <span class="comment">// start block for first FAT</span>
<a name="l01600"></a><a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">01600</a>   uint8_t <a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">fatType_</a>;             <span class="comment">// volume type (12, 16, OR 32)</span>
<a name="l01601"></a><a class="code" href="class_sd_volume.html#a557d01e917256bf2664edbe547b2c6f8">01601</a>   uint16_t <a class="code" href="class_sd_volume.html#a557d01e917256bf2664edbe547b2c6f8">rootDirEntryCount_</a>;  <span class="comment">// number of entries in FAT16 root dir</span>
<a name="l01602"></a><a class="code" href="class_sd_volume.html#a6c73bc9622358cc717df0290dcfc226c">01602</a>   uint32_t <a class="code" href="class_sd_volume.html#a6c73bc9622358cc717df0290dcfc226c">rootDirStart_</a>;       <span class="comment">// root start block for FAT16, cluster for FAT32</span>
<a name="l01603"></a>01603 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01604"></a>01604 <span class="comment">// block caches</span>
<a name="l01605"></a>01605 <span class="comment">// use of static functions save a bit of flash - maybe not worth complexity</span>
<a name="l01606"></a>01606 <span class="comment">//</span>
<a name="l01607"></a><a class="code" href="class_sd_volume.html#a3e779174888dcf714468ee58d07307b5">01607</a>   <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_sd_volume.html#a3e779174888dcf714468ee58d07307b5">CACHE_STATUS_DIRTY</a> = 1;
<a name="l01608"></a><a class="code" href="class_sd_volume.html#abcc63369a240dff82c0141762884142c">01608</a>   <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_sd_volume.html#abcc63369a240dff82c0141762884142c">CACHE_STATUS_FAT_BLOCK</a> = 2;
<a name="l01609"></a>01609   <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_sd_volume.html#a598a8d80cba5bf39d82720c02226c5ea">CACHE_STATUS_MASK</a>
<a name="l01610"></a><a class="code" href="class_sd_volume.html#a598a8d80cba5bf39d82720c02226c5ea">01610</a>      = <a class="code" href="class_sd_volume.html#a3e779174888dcf714468ee58d07307b5">CACHE_STATUS_DIRTY</a> | <a class="code" href="class_sd_volume.html#abcc63369a240dff82c0141762884142c">CACHE_STATUS_FAT_BLOCK</a>;
<a name="l01611"></a><a class="code" href="class_sd_volume.html#ad7dcdbc6dfef683733c9b4e473cc9a39">01611</a>   <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_sd_volume.html#ad7dcdbc6dfef683733c9b4e473cc9a39">CACHE_OPTION_NO_READ</a> = 4;
<a name="l01612"></a>01612   <span class="comment">// value for option argument in cacheFetch to indicate read from cache</span>
<a name="l01613"></a><a class="code" href="class_sd_volume.html#a5330b5c50bf685a94db992c5cbbbc1d9">01613</a>   <span class="keyword">static</span> uint8_t <span class="keyword">const</span> <a class="code" href="class_sd_volume.html#a5330b5c50bf685a94db992c5cbbbc1d9">CACHE_FOR_READ</a> = 0;
<a name="l01614"></a>01614   <span class="comment">// value for option argument in cacheFetch to indicate write to cache</span>
<a name="l01615"></a><a class="code" href="class_sd_volume.html#ae65a3251694e51e0f38f1b813f234998">01615</a>   <span class="keyword">static</span> uint8_t <span class="keyword">const</span> <a class="code" href="class_sd_volume.html#ae65a3251694e51e0f38f1b813f234998">CACHE_FOR_WRITE</a> = <a class="code" href="class_sd_volume.html#a3e779174888dcf714468ee58d07307b5">CACHE_STATUS_DIRTY</a>;
<a name="l01616"></a>01616   <span class="comment">// reserve cache block with no read</span>
<a name="l01617"></a>01617   <span class="keyword">static</span> uint8_t <span class="keyword">const</span> <a class="code" href="class_sd_volume.html#a84445120a60d7ee393d3500e8e410276">CACHE_RESERVE_FOR_WRITE</a>
<a name="l01618"></a><a class="code" href="class_sd_volume.html#a84445120a60d7ee393d3500e8e410276">01618</a>      = <a class="code" href="class_sd_volume.html#a3e779174888dcf714468ee58d07307b5">CACHE_STATUS_DIRTY</a> | <a class="code" href="class_sd_volume.html#ad7dcdbc6dfef683733c9b4e473cc9a39">CACHE_OPTION_NO_READ</a>;
<a name="l01619"></a>01619 <span class="preprocessor">#if USE_MULTIPLE_CARDS</span>
<a name="l01620"></a>01620 <span class="preprocessor"></span>  <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> <a class="code" href="class_sd_volume.html#a2cc1a626151e1ae372cab5540c740a9c">cacheBuffer_</a>;        <span class="comment">// 512 byte cache for device blocks</span>
<a name="l01621"></a>01621   uint32_t <a class="code" href="class_sd_volume.html#aff7820d33e7459503afe447ccd6fb867">cacheBlockNumber_</a>;  <span class="comment">// Logical number of block in the cache</span>
<a name="l01622"></a>01622   uint32_t <a class="code" href="class_sd_volume.html#a879f5e0e65321f8e852d112f2996c12b">cacheFatOffset_</a>;    <span class="comment">// offset for mirrored FAT</span>
<a name="l01623"></a>01623   <a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* <a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">sdCard_</a>;            <span class="comment">// Sd2Card object for cache</span>
<a name="l01624"></a>01624   uint8_t <a class="code" href="class_sd_volume.html#ac9538c87b47325f47ca882ee0a2913be">cacheStatus_</a>;        <span class="comment">// status of cache block</span>
<a name="l01625"></a>01625 <span class="preprocessor">#if USE_SEPARATE_FAT_CACHE</span>
<a name="l01626"></a>01626 <span class="preprocessor"></span>  <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> cacheFatBuffer_;       <span class="comment">// 512 byte cache for FAT</span>
<a name="l01627"></a>01627   uint32_t cacheFatBlockNumber_;  <span class="comment">// current Fat block number</span>
<a name="l01628"></a>01628   uint8_t  cacheFatStatus_;       <span class="comment">// status of cache Fatblock</span>
<a name="l01629"></a>01629 <span class="preprocessor">#endif  // USE_SEPARATE_FAT_CACHE</span>
<a name="l01630"></a>01630 <span class="preprocessor"></span><span class="preprocessor">#else  // USE_MULTIPLE_CARDS</span>
<a name="l01631"></a><a class="code" href="class_sd_volume.html#a2cc1a626151e1ae372cab5540c740a9c">01631</a> <span class="preprocessor"></span>  <span class="keyword">static</span> <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> <a class="code" href="class_sd_volume.html#a2cc1a626151e1ae372cab5540c740a9c">cacheBuffer_</a>;        <span class="comment">// 512 byte cache for device blocks</span>
<a name="l01632"></a><a class="code" href="class_sd_volume.html#aff7820d33e7459503afe447ccd6fb867">01632</a>   <span class="keyword">static</span> uint32_t <a class="code" href="class_sd_volume.html#aff7820d33e7459503afe447ccd6fb867">cacheBlockNumber_</a>;  <span class="comment">// Logical number of block in the cache</span>
<a name="l01633"></a><a class="code" href="class_sd_volume.html#a879f5e0e65321f8e852d112f2996c12b">01633</a>   <span class="keyword">static</span> uint32_t <a class="code" href="class_sd_volume.html#a879f5e0e65321f8e852d112f2996c12b">cacheFatOffset_</a>;    <span class="comment">// offset for mirrored FAT</span>
<a name="l01634"></a><a class="code" href="class_sd_volume.html#ac9538c87b47325f47ca882ee0a2913be">01634</a>   <span class="keyword">static</span> uint8_t <a class="code" href="class_sd_volume.html#ac9538c87b47325f47ca882ee0a2913be">cacheStatus_</a>;        <span class="comment">// status of cache block</span>
<a name="l01635"></a>01635 <span class="preprocessor">#if USE_SEPARATE_FAT_CACHE</span>
<a name="l01636"></a>01636 <span class="preprocessor"></span>  <span class="keyword">static</span> <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> cacheFatBuffer_;       <span class="comment">// 512 byte cache for FAT</span>
<a name="l01637"></a>01637   <span class="keyword">static</span> uint32_t cacheFatBlockNumber_;  <span class="comment">// current Fat block number</span>
<a name="l01638"></a>01638   <span class="keyword">static</span> uint8_t  cacheFatStatus_;       <span class="comment">// status of cache Fatblock</span>
<a name="l01639"></a>01639 <span class="preprocessor">#endif  // USE_SEPARATE_FAT_CACHE</span>
<a name="l01640"></a><a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">01640</a> <span class="preprocessor"></span>  <span class="keyword">static</span> <a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* <a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">sdCard_</a>;            <span class="comment">// Sd2Card object for cache</span>
<a name="l01641"></a>01641 <span class="preprocessor">#endif  // USE_MULTIPLE_CARDS</span>
<a name="l01642"></a>01642 <span class="preprocessor"></span>
<a name="l01643"></a><a class="code" href="class_sd_volume.html#a083aec3686ceb42e5d7ec33a677665da">01643</a>   <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a> *<a class="code" href="class_sd_volume.html#a083aec3686ceb42e5d7ec33a677665da">cacheAddress</a>() {<span class="keywordflow">return</span> &amp;<a class="code" href="class_sd_volume.html#a2cc1a626151e1ae372cab5540c740a9c">cacheBuffer_</a>;}
<a name="l01644"></a><a class="code" href="class_sd_volume.html#a72b2590d65ddecf9b64c055e6ca2e875">01644</a>   uint32_t <a class="code" href="class_sd_volume.html#a72b2590d65ddecf9b64c055e6ca2e875">cacheBlockNumber</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#aff7820d33e7459503afe447ccd6fb867">cacheBlockNumber_</a>;}
<a name="l01645"></a>01645 <span class="preprocessor">#if USE_MULTIPLE_CARDS</span>
<a name="l01646"></a>01646 <span class="preprocessor"></span>  <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#ad1819a01240230107e1c6b62e442bf71">cacheFetch</a>(uint32_t blockNumber, uint8_t options);
<a name="l01647"></a>01647   <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#ad9c0d97c93fbbf878296ec10d54fee4d">cacheFetchData</a>(uint32_t blockNumber, uint8_t options);
<a name="l01648"></a>01648   <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#adedfcc45c70319f1c589b6788e740828">cacheFetchFat</a>(uint32_t blockNumber, uint8_t options);
<a name="l01649"></a>01649   <span class="keywordtype">void</span> <a class="code" href="class_sd_volume.html#acb94e54dae4fea8860fe449105e3d0f6">cacheInvalidate</a>();
<a name="l01650"></a>01650   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a8897e95709ce46e8fa93674f509f9052">cacheSync</a>();
<a name="l01651"></a>01651   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a17ba199a18ee148251f273939fe9f0e7">cacheWriteData</a>();
<a name="l01652"></a>01652   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#acf0fb87b8ded74b67b8a6abae2ef2ca0">cacheWriteFat</a>();
<a name="l01653"></a>01653 <span class="preprocessor">#else  // USE_MULTIPLE_CARDS</span>
<a name="l01654"></a>01654 <span class="preprocessor"></span>  <span class="keyword">static</span> <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#ad1819a01240230107e1c6b62e442bf71">cacheFetch</a>(uint32_t blockNumber, uint8_t options);
<a name="l01655"></a>01655   <span class="keyword">static</span> <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#ad9c0d97c93fbbf878296ec10d54fee4d">cacheFetchData</a>(uint32_t blockNumber, uint8_t options);
<a name="l01656"></a>01656   <span class="keyword">static</span> <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_volume.html#adedfcc45c70319f1c589b6788e740828">cacheFetchFat</a>(uint32_t blockNumber, uint8_t options);
<a name="l01657"></a>01657   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_volume.html#acb94e54dae4fea8860fe449105e3d0f6">cacheInvalidate</a>();
<a name="l01658"></a>01658   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a8897e95709ce46e8fa93674f509f9052">cacheSync</a>();
<a name="l01659"></a>01659   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a17ba199a18ee148251f273939fe9f0e7">cacheWriteData</a>();
<a name="l01660"></a>01660   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#acf0fb87b8ded74b67b8a6abae2ef2ca0">cacheWriteFat</a>();
<a name="l01661"></a>01661 <span class="preprocessor">#endif  // USE_MULTIPLE_CARDS</span>
<a name="l01662"></a>01662 <span class="preprocessor"></span><span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01663"></a>01663   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a5d40516ac800b55c55a377419c1d7d8b">allocContiguous</a>(uint32_t count, uint32_t* <a class="code" href="class_sd_base_file.html#ab5cffcf9871ff99fc7ed9caef94d1849">curCluster</a>);
<a name="l01664"></a><a class="code" href="class_sd_volume.html#a40416a35beda5b5b7ebf000d274d80e5">01664</a>   uint8_t <a class="code" href="class_sd_volume.html#a40416a35beda5b5b7ebf000d274d80e5">blockOfCluster</a>(uint32_t position)<span class="keyword"> const </span>{
<a name="l01665"></a>01665           <span class="keywordflow">return</span> (position &gt;&gt; 9) &amp; (<a class="code" href="class_sd_volume.html#a034c6d16845c12e97738ea5841cd69a9">blocksPerCluster_</a> - 1);}
<a name="l01666"></a>01666   uint32_t <a class="code" href="class_sd_volume.html#a1a7376b8098a3b1f5d6a125e4f985d58">clusterStartBlock</a>(uint32_t cluster) <span class="keyword">const</span>;
<a name="l01667"></a>01667   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#acab4b43b1042289f8b965c66116685c5">fatGet</a>(uint32_t cluster, uint32_t* value);
<a name="l01668"></a>01668   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a6e1860556a3da9a39e1d2cf5689fe7b4">fatPut</a>(uint32_t cluster, uint32_t value);
<a name="l01669"></a><a class="code" href="class_sd_volume.html#a24e8af77381a24055df652f120cd1cef">01669</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a24e8af77381a24055df652f120cd1cef">fatPutEOC</a>(uint32_t cluster) {
<a name="l01670"></a>01670     <span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a6e1860556a3da9a39e1d2cf5689fe7b4">fatPut</a>(cluster, 0x0FFFFFFF);
<a name="l01671"></a>01671   }
<a name="l01672"></a>01672   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#afa90e695e69765a7d3c22a399187667f">freeChain</a>(uint32_t cluster);
<a name="l01673"></a><a class="code" href="class_sd_volume.html#abe0fc33c22e66bc9ebc7635058b5d045">01673</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#abe0fc33c22e66bc9ebc7635058b5d045">isEOC</a>(uint32_t cluster)<span class="keyword"> const </span>{
<a name="l01674"></a>01674     <span class="keywordflow">if</span> (<a class="code" href="_sd_fat_8h.html#a28998c5daf4bd038f4f93172698320b1">FAT12_SUPPORT</a> &amp;&amp; <a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">fatType_</a> == 12) <span class="keywordflow">return</span>  cluster &gt;= <a class="code" href="_sd_fat_8h.html#af1754604787f709306101dcc04391ff2">FAT12EOC_MIN</a>;
<a name="l01675"></a>01675     <span class="keywordflow">if</span> (<a class="code" href="class_sd_volume.html#a6f0521bb1c1bad2b0ff5109d6a6320e3">fatType_</a> == 16) <span class="keywordflow">return</span> cluster &gt;= <a class="code" href="_fat_structs_8h.html#a79b2cefbcfdbf3507fe0496804541b0d">FAT16EOC_MIN</a>;
<a name="l01676"></a>01676     <span class="keywordflow">return</span>  cluster &gt;= <a class="code" href="_fat_structs_8h.html#af5bcc97de8cc4956435d06349d6e714b">FAT32EOC_MIN</a>;
<a name="l01677"></a>01677   }
<a name="l01678"></a><a class="code" href="class_sd_volume.html#a2d3c126910c2c0c9d6ac468a459eec39">01678</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a2d3c126910c2c0c9d6ac468a459eec39">readBlock</a>(uint32_t block, uint8_t* dst) {
<a name="l01679"></a>01679     <span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">sdCard_</a>-&gt;<a class="code" href="class_sd2_card.html#a2d3c126910c2c0c9d6ac468a459eec39">readBlock</a>(block, dst);}
<a name="l01680"></a><a class="code" href="class_sd_volume.html#a71ab95c288539ccc64a48184bab860ae">01680</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#a71ab95c288539ccc64a48184bab860ae">writeBlock</a>(uint32_t block, <span class="keyword">const</span> uint8_t* dst) {
<a name="l01681"></a>01681     <span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#a4af785acfbe605270a1270eabd99eec0">sdCard_</a>-&gt;<a class="code" href="class_sd2_card.html#af3f9516d0822ed675bf92a56c96ebf71">writeBlock</a>(block, dst);
<a name="l01682"></a>01682   }
<a name="l01683"></a>01683 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01684"></a>01684   <span class="comment">// Deprecated functions  - suppress cpplint warnings with NOLINT comment</span>
<a name="l01685"></a>01685 <span class="preprocessor">#if ALLOW_DEPRECATED_FUNCTIONS &amp;&amp; !defined(DOXYGEN)</span>
<a name="l01686"></a>01686 <span class="preprocessor"></span>
<a name="l01687"></a>01687  <span class="keyword">public</span>:
<a name="l01692"></a>01692   <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(<a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>&amp; dev) {<span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(&amp;dev);}  <span class="comment">// NOLINT</span>
<a name="l01698"></a>01698 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(<a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>&amp; dev, uint8_t part) {  <span class="comment">// NOLINT</span>
<a name="l01699"></a>01699     <span class="keywordflow">return</span> <a class="code" href="class_sd_volume.html#ada2a0a79cd7ce879d8c6daf35ad86834">init</a>(&amp;dev, part);
<a name="l01700"></a>01700   }
<a name="l01701"></a>01701 <span class="preprocessor">#endif  // ALLOW_DEPRECATED_FUNCTIONS</span>
<a name="l01702"></a>01702 <span class="preprocessor"></span>};
<a name="l01703"></a>01703 
<a name="l01704"></a>01704 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01710"></a><a class="code" href="struct_fat_pos__t.html">01710</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="struct_fat_pos__t.html" title="internal type for istream do not use in user apps">FatPos_t</a> {
<a name="l01712"></a><a class="code" href="struct_fat_pos__t.html#ac66edcab862b65e1d49ce97f9c74690c">01712</a>   uint32_t <a class="code" href="struct_fat_pos__t.html#ac66edcab862b65e1d49ce97f9c74690c">position</a>;
<a name="l01714"></a><a class="code" href="struct_fat_pos__t.html#a5cc194a79520802c25787f3072f8fe5b">01714</a>   uint32_t <a class="code" href="struct_fat_pos__t.html#a5cc194a79520802c25787f3072f8fe5b">cluster</a>;
<a name="l01715"></a><a class="code" href="struct_fat_pos__t.html#a9c4a81f7fd38269691ca4914416b76be">01715</a>   <a class="code" href="struct_fat_pos__t.html#a9c4a81f7fd38269691ca4914416b76be">FatPos_t</a>() : <a class="code" href="struct_fat_pos__t.html#ac66edcab862b65e1d49ce97f9c74690c">position</a>(0), <a class="code" href="struct_fat_pos__t.html#a5cc194a79520802c25787f3072f8fe5b">cluster</a>(0) {}
<a name="l01716"></a>01716 };
<a name="l01717"></a>01717 
<a name="l01718"></a>01718 <span class="comment">// use the gnu style oflag in open()</span>
<a name="l01720"></a><a class="code" href="_sd_fat_8h.html#ac5a1c3e543273b0374ba114c496e662e">01720</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac5a1c3e543273b0374ba114c496e662e">O_READ</a> = 0X01;
<a name="l01722"></a><a class="code" href="_sd_fat_8h.html#ac13ca62d7e6f8f6d657d4607474652bf">01722</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac13ca62d7e6f8f6d657d4607474652bf">O_RDONLY</a> = <a class="code" href="_sd_fat_8h.html#ac5a1c3e543273b0374ba114c496e662e">O_READ</a>;
<a name="l01724"></a><a class="code" href="_sd_fat_8h.html#a44c1620ada13f6318ab39b9fa38ef55a">01724</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a44c1620ada13f6318ab39b9fa38ef55a">O_WRITE</a> = 0X02;
<a name="l01726"></a><a class="code" href="_sd_fat_8h.html#a782767ee2580bb1566048017b254281d">01726</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a782767ee2580bb1566048017b254281d">O_WRONLY</a> = <a class="code" href="_sd_fat_8h.html#a44c1620ada13f6318ab39b9fa38ef55a">O_WRITE</a>;
<a name="l01728"></a><a class="code" href="_sd_fat_8h.html#ad79c5a45cb5e4855b771629fc15d78f6">01728</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ad79c5a45cb5e4855b771629fc15d78f6">O_RDWR</a> = (O_READ | <a class="code" href="_sd_fat_8h.html#a44c1620ada13f6318ab39b9fa38ef55a">O_WRITE</a>);
<a name="l01730"></a><a class="code" href="_sd_fat_8h.html#a4efda39151f5ef2dc7fbd138be51336a">01730</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a4efda39151f5ef2dc7fbd138be51336a">O_ACCMODE</a> = (O_READ | <a class="code" href="_sd_fat_8h.html#a44c1620ada13f6318ab39b9fa38ef55a">O_WRITE</a>);
<a name="l01732"></a><a class="code" href="_sd_fat_8h.html#a4242b37e810af3a6485adda0e08a9a2b">01732</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a4242b37e810af3a6485adda0e08a9a2b">O_APPEND</a> = 0X04;
<a name="l01734"></a><a class="code" href="_sd_fat_8h.html#a3066c471d52b056dec13fa567f7bbd9d">01734</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a3066c471d52b056dec13fa567f7bbd9d">O_SYNC</a> = 0X08;
<a name="l01736"></a><a class="code" href="_sd_fat_8h.html#a9dc438ff90d0c8af452331c339dbc08e">01736</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a9dc438ff90d0c8af452331c339dbc08e">O_TRUNC</a> = 0X10;
<a name="l01738"></a><a class="code" href="_sd_fat_8h.html#a409d6381c7eafaf7d8978e53b736b966">01738</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a409d6381c7eafaf7d8978e53b736b966">O_AT_END</a> = 0X20;
<a name="l01740"></a><a class="code" href="_sd_fat_8h.html#a20d0ef801486dd02de6ee482de731193">01740</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a20d0ef801486dd02de6ee482de731193">O_CREAT</a> = 0X40;
<a name="l01742"></a><a class="code" href="_sd_fat_8h.html#ab5635d4288cb294c1ed000fa183e072b">01742</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ab5635d4288cb294c1ed000fa183e072b">O_EXCL</a> = 0X80;
<a name="l01743"></a>01743 
<a name="l01744"></a>01744 <span class="comment">// SdBaseFile class static and const definitions</span>
<a name="l01745"></a>01745 <span class="comment">// flags for ls()</span>
<a name="l01747"></a><a class="code" href="_sd_fat_8h.html#ac78cfe032599ef1f5723c62106017fcd">01747</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac78cfe032599ef1f5723c62106017fcd">LS_DATE</a> = 1;
<a name="l01749"></a><a class="code" href="_sd_fat_8h.html#a8170e56f2df0139f3acd73c35636fa7f">01749</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a8170e56f2df0139f3acd73c35636fa7f">LS_SIZE</a> = 2;
<a name="l01751"></a><a class="code" href="_sd_fat_8h.html#af90ecd4124f4c2563b37174be91e76f9">01751</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#af90ecd4124f4c2563b37174be91e76f9">LS_R</a> = 4;
<a name="l01752"></a>01752 
<a name="l01753"></a>01753 
<a name="l01754"></a>01754 <span class="comment">// flags for timestamp</span>
<a name="l01756"></a><a class="code" href="_sd_fat_8h.html#a5f34ce6e95713d872ca6a640c8783462">01756</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a5f34ce6e95713d872ca6a640c8783462">T_ACCESS</a> = 1;
<a name="l01758"></a><a class="code" href="_sd_fat_8h.html#a533dc316f5a59209ac5e9c630d2df4c4">01758</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a533dc316f5a59209ac5e9c630d2df4c4">T_CREATE</a> = 2;
<a name="l01760"></a><a class="code" href="_sd_fat_8h.html#a2a6192fd0f5847783868deed6de53d1e">01760</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a2a6192fd0f5847783868deed6de53d1e">T_WRITE</a> = 4;
<a name="l01761"></a>01761 <span class="comment">// values for type_</span>
<a name="l01763"></a><a class="code" href="_sd_fat_8h.html#a4da8c96e256b06356321e81705494010">01763</a> <span class="comment"></span>uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a4da8c96e256b06356321e81705494010">FAT_FILE_TYPE_CLOSED</a> = 0;
<a name="l01765"></a><a class="code" href="_sd_fat_8h.html#a666774999b9afd627fdad75471101581">01765</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a666774999b9afd627fdad75471101581">FAT_FILE_TYPE_NORMAL</a> = 1;
<a name="l01767"></a><a class="code" href="_sd_fat_8h.html#a1bb2e8f6b6f90bbf4d02608cd267af42">01767</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a1bb2e8f6b6f90bbf4d02608cd267af42">FAT_FILE_TYPE_ROOT_FIXED</a> = 2;
<a name="l01769"></a><a class="code" href="_sd_fat_8h.html#a9a1a07cb1d09cfdb3cc53183c6e5dc57">01769</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a9a1a07cb1d09cfdb3cc53183c6e5dc57">FAT_FILE_TYPE_ROOT32</a> = 3;
<a name="l01771"></a><a class="code" href="_sd_fat_8h.html#ac301b0465fdd7953c6e110b9896cc9fd">01771</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#ac301b0465fdd7953c6e110b9896cc9fd">FAT_FILE_TYPE_SUBDIR</a> = 4;
<a name="l01773"></a><a class="code" href="_sd_fat_8h.html#abc9b0906aeeedfe122b0ca629bac889b">01773</a> uint8_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#abc9b0906aeeedfe122b0ca629bac889b">FAT_FILE_TYPE_MIN_DIR</a> = <a class="code" href="_sd_fat_8h.html#a1bb2e8f6b6f90bbf4d02608cd267af42">FAT_FILE_TYPE_ROOT_FIXED</a>;
<a name="l01774"></a>01774 
<a name="l01782"></a><a class="code" href="_sd_fat_8h.html#a44899ad42ddf32ff1c1a73b5251b304a">01782</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t <a class="code" href="_sd_fat_8h.html#a44899ad42ddf32ff1c1a73b5251b304a">FAT_DATE</a>(uint16_t year, uint8_t month, uint8_t day) {
<a name="l01783"></a>01783   <span class="keywordflow">return</span> (year - 1980) &lt;&lt; 9 | month &lt;&lt; 5 | day;
<a name="l01784"></a>01784 }
<a name="l01790"></a><a class="code" href="_sd_fat_8h.html#a279a75f907dd2603543c7bdad00ff603">01790</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t <a class="code" href="_sd_fat_8h.html#a279a75f907dd2603543c7bdad00ff603">FAT_YEAR</a>(uint16_t fatDate) {
<a name="l01791"></a>01791   <span class="keywordflow">return</span> 1980 + (fatDate &gt;&gt; 9);
<a name="l01792"></a>01792 }
<a name="l01798"></a><a class="code" href="_sd_fat_8h.html#a429bc2d96f5bc26dc3bd6cc2bd535b84">01798</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a429bc2d96f5bc26dc3bd6cc2bd535b84">FAT_MONTH</a>(uint16_t fatDate) {
<a name="l01799"></a>01799   <span class="keywordflow">return</span> (fatDate &gt;&gt; 5) &amp; 0XF;
<a name="l01800"></a>01800 }
<a name="l01806"></a><a class="code" href="_sd_fat_8h.html#a4cc8bc105529bf9e9c11e8ef099d68b0">01806</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a4cc8bc105529bf9e9c11e8ef099d68b0">FAT_DAY</a>(uint16_t fatDate) {
<a name="l01807"></a>01807   <span class="keywordflow">return</span> fatDate &amp; 0X1F;
<a name="l01808"></a>01808 }
<a name="l01816"></a><a class="code" href="_sd_fat_8h.html#a375720927be5a39475d48b2d75dae29a">01816</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint16_t <a class="code" href="_sd_fat_8h.html#a375720927be5a39475d48b2d75dae29a">FAT_TIME</a>(uint8_t hour, uint8_t minute, uint8_t second) {
<a name="l01817"></a>01817   <span class="keywordflow">return</span> hour &lt;&lt; 11 | minute &lt;&lt; 5 | second &gt;&gt; 1;
<a name="l01818"></a>01818 }
<a name="l01824"></a><a class="code" href="_sd_fat_8h.html#ae7c733d49a5570054f6db3bd53332ba1">01824</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#ae7c733d49a5570054f6db3bd53332ba1">FAT_HOUR</a>(uint16_t fatTime) {
<a name="l01825"></a>01825   <span class="keywordflow">return</span> fatTime &gt;&gt; 11;
<a name="l01826"></a>01826 }
<a name="l01832"></a><a class="code" href="_sd_fat_8h.html#a1b09676a41ae6c9e19664bdcd5b1d34e">01832</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a1b09676a41ae6c9e19664bdcd5b1d34e">FAT_MINUTE</a>(uint16_t fatTime) {
<a name="l01833"></a>01833   <span class="keywordflow">return</span>(fatTime &gt;&gt; 5) &amp; 0X3F;
<a name="l01834"></a>01834 }
<a name="l01842"></a><a class="code" href="_sd_fat_8h.html#a4d553e2088d42e01d6c08ee84e611b00">01842</a> <span class="keyword">static</span> <span class="keyword">inline</span> uint8_t <a class="code" href="_sd_fat_8h.html#a4d553e2088d42e01d6c08ee84e611b00">FAT_SECOND</a>(uint16_t fatTime) {
<a name="l01843"></a>01843   <span class="keywordflow">return</span> 2*(fatTime &amp; 0X1F);
<a name="l01844"></a>01844 }
<a name="l01846"></a><a class="code" href="_sd_fat_8h.html#a441bb1bc5f52d512656de3b86a279948">01846</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a441bb1bc5f52d512656de3b86a279948">FAT_DEFAULT_DATE</a> = ((2000 - 1980) &lt;&lt; 9) | (1 &lt;&lt; 5) | 1;
<a name="l01848"></a><a class="code" href="_sd_fat_8h.html#a00451fc2d3563a2255797bd1f40507fb">01848</a> uint16_t <span class="keyword">const</span> <a class="code" href="_sd_fat_8h.html#a00451fc2d3563a2255797bd1f40507fb">FAT_DEFAULT_TIME</a> = (1 &lt;&lt; 11);
<a name="l01849"></a>01849 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l01854"></a><a class="code" href="class_sd_base_file.html">01854</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> {
<a name="l01855"></a>01855  <span class="keyword">public</span>:
<a name="l01857"></a><a class="code" href="class_sd_base_file.html#a9e1a71e3766b3acc8171920ada4e7717">01857</a>   <a class="code" href="class_sd_base_file.html#a9e1a71e3766b3acc8171920ada4e7717">SdBaseFile</a>() : <a class="code" href="class_sd_base_file.html#a800e5043596b8bec0dd32076d3c9750c">writeError</a>(false), <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>(FAT_FILE_TYPE_CLOSED) {}
<a name="l01858"></a>01858   <a class="code" href="class_sd_base_file.html#a9e1a71e3766b3acc8171920ada4e7717">SdBaseFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>);
<a name="l01859"></a>01859 <span class="preprocessor">  #if DESTRUCTOR_CLOSES_FILE</span>
<a name="l01860"></a>01860 <span class="preprocessor"></span>  ~<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>() {<span class="keywordflow">if</span>(<a class="code" href="class_sd_base_file.html#a3c7351cec1380d07f9e4b3ec96b2b1ff">isOpen</a>()) <a class="code" href="class_sd_base_file.html#a46143fd6de3be9ab9951f140d3ae8c2f">close</a>();}
<a name="l01861"></a>01861 <span class="preprocessor">  #endif</span>
<a name="l01862"></a>01862 <span class="preprocessor"></span>
<a name="l01867"></a><a class="code" href="class_sd_base_file.html#a800e5043596b8bec0dd32076d3c9750c">01867</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a800e5043596b8bec0dd32076d3c9750c">writeError</a>;
<a name="l01869"></a><a class="code" href="class_sd_base_file.html#a9b199fded04cffe6a609465dce43fdcc">01869</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a9b199fded04cffe6a609465dce43fdcc">getWriteError</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a800e5043596b8bec0dd32076d3c9750c">writeError</a>;}
<a name="l01871"></a><a class="code" href="class_sd_base_file.html#af50f0c1e1c726ef3dee08a84456090b9">01871</a>   <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#af50f0c1e1c726ef3dee08a84456090b9">clearWriteError</a>() {<a class="code" href="class_sd_base_file.html#a800e5043596b8bec0dd32076d3c9750c">writeError</a> = 0;}
<a name="l01872"></a>01872   <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l01873"></a>01873   <span class="comment">// helpers for stream classes</span>
<a name="l01877"></a>01877 <span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#af64a10413bed83901d3f08274019d6bb">getpos</a>(<a class="code" href="struct_fat_pos__t.html" title="internal type for istream do not use in user apps">FatPos_t</a>* pos);
<a name="l01881"></a>01881   <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a48594bc03b5a4a47cf774e01c40be1b5">setpos</a>(<a class="code" href="struct_fat_pos__t.html" title="internal type for istream do not use in user apps">FatPos_t</a>* pos);
<a name="l01882"></a>01882   <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l01884"></a><a class="code" href="class_sd_base_file.html#af93dbeb8dc6867fcc97a7b42e2898f02">01884</a> <span class="comment"></span>  uint32_t <a class="code" href="class_sd_base_file.html#af93dbeb8dc6867fcc97a7b42e2898f02">available</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a134f35678a76fc9be1efe2c290483814">fileSize</a>() - <a class="code" href="class_sd_base_file.html#a4c56d435ee4c9cbc50c6f5aaf1e5d64d">curPosition</a>();}
<a name="l01885"></a>01885   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a46143fd6de3be9ab9951f140d3ae8c2f">close</a>();
<a name="l01886"></a>01886   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a1934f84b25a170fbdfbee1f874c7a315">contiguousRange</a>(uint32_t* bgnBlock, uint32_t* <a class="code" href="class_sd_base_file.html#a59ccb0407e4759a5363d4262e18aec73">endBlock</a>);
<a name="l01887"></a>01887   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#aa541db9563ce4a0b765b11b10f76b449">createContiguous</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile,
<a name="l01888"></a>01888           <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint32_t size);
<a name="l01890"></a><a class="code" href="class_sd_base_file.html#ab5cffcf9871ff99fc7ed9caef94d1849">01890</a>   uint32_t <a class="code" href="class_sd_base_file.html#ab5cffcf9871ff99fc7ed9caef94d1849">curCluster</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#aff23051fbe8e6ad2efa75c06390047d5">curCluster_</a>;}
<a name="l01892"></a><a class="code" href="class_sd_base_file.html#a4c56d435ee4c9cbc50c6f5aaf1e5d64d">01892</a>   uint32_t <a class="code" href="class_sd_base_file.html#a4c56d435ee4c9cbc50c6f5aaf1e5d64d">curPosition</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ade9334005143268ed5c81348abbffb4b">curPosition_</a>;}
<a name="l01894"></a><a class="code" href="class_sd_base_file.html#a2c5568d41d6270faa79b89323ae63c6d">01894</a>   <span class="keyword">static</span> <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* <a class="code" href="class_sd_base_file.html#a2c5568d41d6270faa79b89323ae63c6d">cwd</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a00928c3349d354109e2413bcc58c5701">cwd_</a>;}
<a name="l01922"></a><a class="code" href="class_sd_base_file.html#ae89cdf7331e346cc8b7ce4a935c5b3e5">01922</a>   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ae89cdf7331e346cc8b7ce4a935c5b3e5">dateTimeCallback</a>(
<a name="l01923"></a>01923     <span class="keywordtype">void</span> (*dateTime)(uint16_t* date, uint16_t* <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>)) {
<a name="l01924"></a>01924     <a class="code" href="class_sd_base_file.html#a0fbdf53a669c68035108f7e71804ebc2">dateTime_</a> = dateTime;
<a name="l01925"></a>01925   }
<a name="l01927"></a><a class="code" href="class_sd_base_file.html#aa8e3adbe61ae1e665819aa0f56c50169">01927</a>   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#aa8e3adbe61ae1e665819aa0f56c50169">dateTimeCallbackCancel</a>() {<a class="code" href="class_sd_base_file.html#a0fbdf53a669c68035108f7e71804ebc2">dateTime_</a> = 0;}
<a name="l01928"></a>01928   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a5a55859ea4ca96697df8852acb2e76d1">dirEntry</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir);
<a name="l01929"></a>01929   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a3d5d6e21ff652084fa88f8f7d902c5b5">dirName</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir, <span class="keywordtype">char</span>* name);
<a name="l01930"></a>01930   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#ace1cb5fa7dac7c504114b2b24ec144d2">exists</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);
<a name="l01931"></a>01931   int16_t <a class="code" href="class_sd_base_file.html#af3081927d174cf7558953769f3dec7a3">fgets</a>(<span class="keywordtype">char</span>* str, int16_t num, <span class="keywordtype">char</span>* delim = 0);
<a name="l01933"></a><a class="code" href="class_sd_base_file.html#a134f35678a76fc9be1efe2c290483814">01933</a>   uint32_t <a class="code" href="class_sd_base_file.html#a134f35678a76fc9be1efe2c290483814">fileSize</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a95d9791fe91d8b1385fc1f11b1dccb83">fileSize_</a>;}
<a name="l01935"></a><a class="code" href="class_sd_base_file.html#a58d3a00e51805ee03012cb2c86414796">01935</a>   uint32_t <a class="code" href="class_sd_base_file.html#a58d3a00e51805ee03012cb2c86414796">firstCluster</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a3ef82733a6bdd87b2f4a3128d2ad510d">firstCluster_</a>;}
<a name="l01936"></a>01936   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a6ee2b08977084de3a31d1509d7a8e6af">getFilename</a>(<span class="keywordtype">char</span>* name);
<a name="l01937"></a>01937   uint8_t <a class="code" href="class_sd_base_file.html#a9077541555656202bf04dd667b7214e6">lfn_checksum</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pFCBName);
<a name="l01938"></a>01938   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a31e4a87b15abb09d98d3a4ab1415f02c">openParentReturnFile</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint8_t *dname, <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> *newParent, <span class="keywordtype">boolean</span> bMakeDirs);
<a name="l01939"></a>01939 
<a name="l01940"></a>01940   
<a name="l01942"></a><a class="code" href="class_sd_base_file.html#a50918fb073b73ccef883870dfb705d74">01942</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a50918fb073b73ccef883870dfb705d74">isDir</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> &gt;= <a class="code" href="_sd_fat_8h.html#abc9b0906aeeedfe122b0ca629bac889b">FAT_FILE_TYPE_MIN_DIR</a>;}
<a name="l01944"></a><a class="code" href="class_sd_base_file.html#aee673f3d8abf2d1bfd841274900fd40a">01944</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#aee673f3d8abf2d1bfd841274900fd40a">isFile</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> == <a class="code" href="_sd_fat_8h.html#a666774999b9afd627fdad75471101581">FAT_FILE_TYPE_NORMAL</a>;}
<a name="l01946"></a><a class="code" href="class_sd_base_file.html#a3c7351cec1380d07f9e4b3ec96b2b1ff">01946</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a3c7351cec1380d07f9e4b3ec96b2b1ff">isOpen</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> != <a class="code" href="_sd_fat_8h.html#a4da8c96e256b06356321e81705494010">FAT_FILE_TYPE_CLOSED</a>;}
<a name="l01948"></a><a class="code" href="class_sd_base_file.html#a8a0d7f6a7297d2b9772c4033b2296d56">01948</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a8a0d7f6a7297d2b9772c4033b2296d56">isSubDir</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> == <a class="code" href="_sd_fat_8h.html#ac301b0465fdd7953c6e110b9896cc9fd">FAT_FILE_TYPE_SUBDIR</a>;}
<a name="l01950"></a><a class="code" href="class_sd_base_file.html#adb67b2a249620b49f23a8bc03cbdb3b0">01950</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#adb67b2a249620b49f23a8bc03cbdb3b0">isRoot</a>()<span class="keyword"> const </span>{
<a name="l01951"></a>01951     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> == FAT_FILE_TYPE_ROOT_FIXED || <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a> == <a class="code" href="_sd_fat_8h.html#a9a1a07cb1d09cfdb3cc53183c6e5dc57">FAT_FILE_TYPE_ROOT32</a>;
<a name="l01952"></a>01952   }
<a name="l01953"></a>01953   <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a3b2b7caeb6c55be39ac4aceee4718f1d">ls</a>(uint8_t flags = 0, uint8_t indent = 0);
<a name="l01954"></a>01954   <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a3b2b7caeb6c55be39ac4aceee4718f1d">ls</a>(uint8_t flags = 0);
<a name="l01955"></a>01955   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dir, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, <span class="keywordtype">bool</span> pFlag = <span class="keyword">true</span>);
<a name="l01956"></a>01956   <span class="comment">// alias for backward compactability</span>
<a name="l01957"></a><a class="code" href="class_sd_base_file.html#a920b65592f1ba58c38c01e0518ae94c9">01957</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a920b65592f1ba58c38c01e0518ae94c9">makeDir</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dir, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>) {
<a name="l01958"></a>01958     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(dir, path, <span class="keyword">false</span>);
<a name="l01959"></a>01959   }
<a name="l01960"></a>01960   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, uint16_t <a class="code" href="class_sd_base_file.html#a7e1f783bbc6758254c17c5d46122e830">index</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>);
<a name="l01961"></a>01961   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>);
<a name="l01962"></a>01962   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a> = O_READ);
<a name="l01963"></a>01963   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#abd013dab96da2ef4253c7ddc9cddf14a">openNext</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>);
<a name="l01964"></a>01964   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a2e90ca886ca5681df690eeb646758aa5">openRoot</a>(<a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>* vol);
<a name="l01965"></a><a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">01965</a>   int8_t <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir, <span class="keywordtype">char</span> *longfilename) {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(&amp;dir, longfilename);}
<a name="l01966"></a>01966   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#a9040fa1d479d71edf3a826f4691c35c4">peek</a>();
<a name="l01967"></a>01967   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a7c8af12f026b1fc080e8ebfef7fce909">printCreateDateTime</a>();
<a name="l01968"></a>01968   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a56d33961896e2a571012c6f64f69f86e">printFatDate</a>(uint16_t fatDate);
<a name="l01969"></a>01969   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#a93fd2d0e3e1a51127dd59815c3ad92a3">printFatTime</a>(uint16_t fatTime);
<a name="l01970"></a>01970   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a5ded19364c125073d664935bed8239aa">printModifyDateTime</a>();
<a name="l01971"></a>01971   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#aeb564423f405ec9e71b62926b1ef8ab5">printField</a>(int16_t value, <span class="keywordtype">char</span> term);
<a name="l01972"></a>01972   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#aeb564423f405ec9e71b62926b1ef8ab5">printField</a>(uint16_t value, <span class="keywordtype">char</span> term);
<a name="l01973"></a>01973   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#aeb564423f405ec9e71b62926b1ef8ab5">printField</a>(int32_t value, <span class="keywordtype">char</span> term);
<a name="l01974"></a>01974   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#aeb564423f405ec9e71b62926b1ef8ab5">printField</a>(uint32_t value, <span class="keywordtype">char</span> term);
<a name="l01975"></a>01975   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a57f9e42369a4b97e6b21ed0040115e17">printName</a>();
<a name="l01976"></a>01976   int16_t <a class="code" href="class_sd_base_file.html#a5a4c0ff07215b20f25d11fef7710ed59">read</a>();
<a name="l01977"></a>01977   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#a5a4c0ff07215b20f25d11fef7710ed59">read</a>(<span class="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> nbyte);
<a name="l01978"></a>01978   int8_t <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* dir, <span class="keywordtype">char</span> *longfilename);
<a name="l01979"></a>01979 
<a name="l01980"></a>01980   <span class="keyword">static</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>);
<a name="l01981"></a>01981   <span class="keywordtype">bool</span> <span class="keyword">remove</span>();
<a name="l01983"></a><a class="code" href="class_sd_base_file.html#ab8734e666421c9fe3b6380a818c6c727">01983</a>   <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ab8734e666421c9fe3b6380a818c6c727">rewind</a>() {<a class="code" href="class_sd_base_file.html#a37e6f66b2ccbd829cf7a62a5d3bcc0b3">seekSet</a>(0);}
<a name="l01984"></a>01984   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a34221bbb3afb83430f8d21f59d8e5b1c">rename</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* newPath);
<a name="l01985"></a>01985   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a8565ae91a87acd4ed1a648e52e51ce13">rmdir</a>();
<a name="l01986"></a>01986   <span class="comment">// for backward compatibility</span>
<a name="l01987"></a><a class="code" href="class_sd_base_file.html#ae2acaa045ad377689b6786197a157288">01987</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#ae2acaa045ad377689b6786197a157288">rmDir</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a8565ae91a87acd4ed1a648e52e51ce13">rmdir</a>();}
<a name="l01988"></a>01988   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a5cbe5f8201b8457438d219e6b33b42bf">rmRfStar</a>();
<a name="l01993"></a><a class="code" href="class_sd_base_file.html#ae79988724675a378d01d9158b1b8b667">01993</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#ae79988724675a378d01d9158b1b8b667">seekCur</a>(int32_t offset) {
<a name="l01994"></a>01994     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a37e6f66b2ccbd829cf7a62a5d3bcc0b3">seekSet</a>(<a class="code" href="class_sd_base_file.html#ade9334005143268ed5c81348abbffb4b">curPosition_</a> + offset);
<a name="l01995"></a>01995   }
<a name="l02000"></a><a class="code" href="class_sd_base_file.html#ae7667637428e752e4ff64e07c2e88c92">02000</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#ae7667637428e752e4ff64e07c2e88c92">seekEnd</a>(int32_t offset = 0) {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a37e6f66b2ccbd829cf7a62a5d3bcc0b3">seekSet</a>(<a class="code" href="class_sd_base_file.html#a95d9791fe91d8b1385fc1f11b1dccb83">fileSize_</a> + offset);}
<a name="l02001"></a>02001   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a37e6f66b2ccbd829cf7a62a5d3bcc0b3">seekSet</a>(uint32_t pos);
<a name="l02002"></a>02002   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a3eb7f41182c04388c951db242c13f845">sync</a>();
<a name="l02003"></a>02003   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a65d54c8f0cc5089edbd0b08eb3e7830e">timestamp</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* file);
<a name="l02004"></a>02004   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a65d54c8f0cc5089edbd0b08eb3e7830e">timestamp</a>(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
<a name="l02005"></a>02005           uint8_t hour, uint8_t minute, uint8_t second);
<a name="l02011"></a><a class="code" href="class_sd_base_file.html#a7c3e8c8aa22970484617493a084000b9">02011</a>   uint8_t <a class="code" href="class_sd_base_file.html#a7c3e8c8aa22970484617493a084000b9">type</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>;}
<a name="l02012"></a>02012   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#aa0f431cd6c841a1a006aee221a8e411d">truncate</a>(uint32_t size);
<a name="l02014"></a><a class="code" href="class_sd_base_file.html#aed2457152a60a9f78da3c34813e396d0">02014</a>   <a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>* <a class="code" href="class_sd_base_file.html#aed2457152a60a9f78da3c34813e396d0">volume</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a63016fa006e3d5ca83b84d58fc49de23">vol_</a>;}
<a name="l02015"></a>02015   <span class="keywordtype">int</span> <a class="code" href="class_sd_base_file.html#aaf4f4cafe922e54d7b10c1b18bf60d07">write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> nbyte);
<a name="l02016"></a>02016 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02017"></a>02017  <span class="keyword">public</span>:
<a name="l02018"></a>02018   <span class="comment">// allow SdFat to set cwd_</span>
<a name="l02019"></a><a class="code" href="class_sd_base_file.html#ac838f1e6beb01ec57bd4b52e57df85e7">02019</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sd_fat.html" title="Integration class for the SdFat library.">SdFat</a>;
<a name="l02020"></a>02020   <span class="comment">// global pointer to cwd dir</span>
<a name="l02021"></a><a class="code" href="class_sd_base_file.html#a00928c3349d354109e2413bcc58c5701">02021</a>   <span class="keyword">static</span> <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* <a class="code" href="class_sd_base_file.html#a00928c3349d354109e2413bcc58c5701">cwd_</a>;
<a name="l02022"></a>02022   <span class="comment">// data time callback function</span>
<a name="l02023"></a><a class="code" href="class_sd_base_file.html#a0fbdf53a669c68035108f7e71804ebc2">02023</a>   <span class="keyword">static</span> void (*<a class="code" href="class_sd_base_file.html#a0fbdf53a669c68035108f7e71804ebc2">dateTime_</a>)(uint16_t* date, uint16_t* <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>);
<a name="l02024"></a>02024   <span class="comment">// bits defined in flags_</span>
<a name="l02025"></a>02025   <span class="comment">// should be 0X0F</span>
<a name="l02026"></a><a class="code" href="class_sd_base_file.html#aba9e279d9dcd886c9ed2ceb557fdecef">02026</a>   <span class="keyword">static</span> uint8_t <span class="keyword">const</span> <a class="code" href="class_sd_base_file.html#aba9e279d9dcd886c9ed2ceb557fdecef">F_OFLAG</a> = (O_ACCMODE | O_APPEND | <a class="code" href="_sd_fat_8h.html#a3066c471d52b056dec13fa567f7bbd9d">O_SYNC</a>);
<a name="l02027"></a>02027   <span class="comment">// sync of directory entry required</span>
<a name="l02028"></a><a class="code" href="class_sd_base_file.html#a6254189769a26f9cb550358dd8b3db26">02028</a>   <span class="keyword">static</span> uint8_t <span class="keyword">const</span> <a class="code" href="class_sd_base_file.html#a6254189769a26f9cb550358dd8b3db26">F_FILE_DIR_DIRTY</a> = 0X80;
<a name="l02029"></a>02029 
<a name="l02030"></a>02030   <span class="comment">// private data</span>
<a name="l02031"></a><a class="code" href="class_sd_base_file.html#ab9bc8d18308217bd7df78a01eca175b3">02031</a>   uint8_t   <a class="code" href="class_sd_base_file.html#ab9bc8d18308217bd7df78a01eca175b3">flags_</a>;         <span class="comment">// See above for definition of flags_ bits</span>
<a name="l02032"></a><a class="code" href="class_sd_base_file.html#ae5269bbb9495f29e3f68ddaf24856fec">02032</a>   uint8_t   <a class="code" href="class_sd_base_file.html#ae5269bbb9495f29e3f68ddaf24856fec">fstate_</a>;        <span class="comment">// error and eof indicator</span>
<a name="l02033"></a><a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">02033</a>   uint8_t   <a class="code" href="class_sd_base_file.html#ac52855672d3aac6d0e3b2228ac9e19dc">type_</a>;          <span class="comment">// type of file see above for values</span>
<a name="l02034"></a><a class="code" href="class_sd_base_file.html#adf65af6edbe7a86d1e94c7604c66ea51">02034</a>   uint8_t   <a class="code" href="class_sd_base_file.html#adf65af6edbe7a86d1e94c7604c66ea51">dirIndex_</a>;      <span class="comment">// index of directory entry in dirBlock</span>
<a name="l02035"></a><a class="code" href="class_sd_base_file.html#a63016fa006e3d5ca83b84d58fc49de23">02035</a>   <a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>* <a class="code" href="class_sd_base_file.html#a63016fa006e3d5ca83b84d58fc49de23">vol_</a>;           <span class="comment">// volume where file is located</span>
<a name="l02036"></a><a class="code" href="class_sd_base_file.html#aff23051fbe8e6ad2efa75c06390047d5">02036</a>   uint32_t  <a class="code" href="class_sd_base_file.html#aff23051fbe8e6ad2efa75c06390047d5">curCluster_</a>;    <span class="comment">// cluster for current file position</span>
<a name="l02037"></a><a class="code" href="class_sd_base_file.html#ade9334005143268ed5c81348abbffb4b">02037</a>   uint32_t  <a class="code" href="class_sd_base_file.html#ade9334005143268ed5c81348abbffb4b">curPosition_</a>;   <span class="comment">// current file position in bytes from beginning</span>
<a name="l02038"></a><a class="code" href="class_sd_base_file.html#a99b330c30b74c2cf030c279593a4c1dc">02038</a>   uint32_t  <a class="code" href="class_sd_base_file.html#a99b330c30b74c2cf030c279593a4c1dc">dirBlock_</a>;      <span class="comment">// block for this files directory entry</span>
<a name="l02039"></a><a class="code" href="class_sd_base_file.html#a95d9791fe91d8b1385fc1f11b1dccb83">02039</a>   uint32_t  <a class="code" href="class_sd_base_file.html#a95d9791fe91d8b1385fc1f11b1dccb83">fileSize_</a>;      <span class="comment">// file size in bytes</span>
<a name="l02040"></a><a class="code" href="class_sd_base_file.html#a3ef82733a6bdd87b2f4a3128d2ad510d">02040</a>   uint32_t  <a class="code" href="class_sd_base_file.html#a3ef82733a6bdd87b2f4a3128d2ad510d">firstCluster_</a>;  <span class="comment">// first cluster of file</span>
<a name="l02041"></a><a class="code" href="class_sd_base_file.html#a7475d64e6045e51366045a2616fd0f41">02041</a>   <span class="keywordtype">char</span> *<a class="code" href="class_sd_base_file.html#a7475d64e6045e51366045a2616fd0f41">pathend</a>;
<a name="l02042"></a>02042 
<a name="l02043"></a>02043 
<a name="l02044"></a>02044 
<a name="l02046"></a>02046   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#adb95113ff5d9b9ef071e06ecc27ad7fa">openParent</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dir);
<a name="l02047"></a>02047   <span class="comment">// private functions</span>
<a name="l02048"></a>02048   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a2e2cb16fcc27d66e464cecf298392019">addCluster</a>();
<a name="l02049"></a>02049   <a class="code" href="unioncache__t.html" title="Cache for an SD data block.">cache_t</a>* <a class="code" href="class_sd_base_file.html#a4c1da892dee2bddc018794aa1caf3294">addDirCluster</a>();
<a name="l02050"></a>02050   <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* <a class="code" href="class_sd_base_file.html#aae06fb5c45eef10196905a0227feceef">cacheDirEntry</a>(uint8_t action);
<a name="l02051"></a>02051   int8_t <a class="code" href="class_sd_base_file.html#aa4bd621a5bee79f8d723f913165f5078">lsPrintNext</a>(uint8_t flags, uint8_t indent);
<a name="l02052"></a>02052   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#ac8ad97ceb89862568bdbe6dbe23605f9">make83Name</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* str, uint8_t* name, <span class="keyword">const</span> <span class="keywordtype">char</span>** ptr);
<a name="l02053"></a>02053   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* parent, <span class="keyword">const</span> uint8_t *dname);
<a name="l02054"></a>02054   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* dirFile, <span class="keyword">const</span> uint8_t *dname, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>, <span class="keywordtype">bool</span> bDir);
<a name="l02055"></a>02055   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a60f805a79ed58914758a998025ec4f54">openCachedEntry</a>(uint8_t cacheIndex, uint8_t oflags);
<a name="l02056"></a>02056   <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* <a class="code" href="class_sd_base_file.html#adae59feaadf1b33cdbcb5e46a338980e">readDirCache</a>();
<a name="l02057"></a>02057   <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>* <a class="code" href="class_sd_base_file.html#a855caab821dc329660acb6fd51f99ae2">readDirCacheSpecial</a>();
<a name="l02058"></a>02058   <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a> *<a class="code" href="class_sd_base_file.html#a2ebc5837267d2a533e858bbf800b96ed">getLongFilename</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a> *dir, <span class="keywordtype">char</span> *longFilename, int8_t cVFATNeeded, uint32_t *pwIndexPos);
<a name="l02059"></a>02059   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a8c94aea910dca9cce81fa337d505e281">findSpace</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a> *dir, int8_t cVFATNeeded, int8_t *pcVFATFound, uint32_t *pwIndexPos);
<a name="l02060"></a>02060   uint8_t <a class="code" href="class_sd_base_file.html#a0015654d9a0ad17f253c2704640f411b">lsRecursive</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> *parent, uint8_t level, <span class="keywordtype">char</span> *findFilename, <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> *pParentFound);
<a name="l02061"></a>02061 
<a name="l02062"></a>02062   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a12319368009edbd69755172aba6ff61f">setDirSize</a>();
<a name="l02063"></a>02063 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02064"></a>02064 <span class="comment">// to be deleted</span>
<a name="l02065"></a>02065   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ae55cbdb1584e2f11592c493f42993629">printDirName</a>(<span class="keyword">const</span> <a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir,
<a name="l02066"></a>02066     uint8_t width, <span class="keywordtype">bool</span> printSlash);
<a name="l02067"></a>02067 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02068"></a>02068 <span class="comment">// Deprecated functions  - suppress cpplint warnings with NOLINT comment</span>
<a name="l02069"></a>02069 <span class="preprocessor">#if ALLOW_DEPRECATED_FUNCTIONS &amp;&amp; !defined(DOXYGEN)</span>
<a name="l02070"></a>02070 <span class="preprocessor"></span>
<a name="l02071"></a>02071  <span class="keyword">public</span>:
<a name="l02078"></a>02078   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a1934f84b25a170fbdfbee1f874c7a315">contiguousRange</a>(uint32_t&amp; bgnBlock, uint32_t&amp; <a class="code" href="class_sd_base_file.html#a59ccb0407e4759a5363d4262e18aec73">endBlock</a>) {  <span class="comment">// NOLINT</span>
<a name="l02079"></a>02079     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a1934f84b25a170fbdfbee1f874c7a315">contiguousRange</a>(&amp;bgnBlock, &amp;endBlock);
<a name="l02080"></a>02080   }
<a name="l02089"></a>02089   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#aa541db9563ce4a0b765b11b10f76b449">createContiguous</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile,  <span class="comment">// NOLINT</span>
<a name="l02090"></a>02090     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint32_t size) {
<a name="l02091"></a>02091     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#aa541db9563ce4a0b765b11b10f76b449">createContiguous</a>(&amp;dirFile, path, size);
<a name="l02092"></a>02092   }
<a name="l02098"></a>02098   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ae89cdf7331e346cc8b7ce4a935c5b3e5">dateTimeCallback</a>(
<a name="l02099"></a>02099     <span class="keywordtype">void</span> (*dateTime)(uint16_t&amp; date, uint16_t&amp; <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>)) {  <span class="comment">// NOLINT</span>
<a name="l02100"></a>02100     oldDateTime_ = dateTime;
<a name="l02101"></a>02101     <a class="code" href="class_sd_base_file.html#a0fbdf53a669c68035108f7e71804ebc2">dateTime_</a> = dateTime ? oldToNew : 0;
<a name="l02102"></a>02102   }
<a name="l02107"></a>02107   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a5a55859ea4ca96697df8852acb2e76d1">dirEntry</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir) {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a5a55859ea4ca96697df8852acb2e76d1">dirEntry</a>(&amp;dir);}  <span class="comment">// NOLINT</span>
<a name="l02115"></a>02115 <span class="comment"></span>  <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dir, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>) {  <span class="comment">// NOLINT</span>
<a name="l02116"></a>02116     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(&amp;dir, path);
<a name="l02117"></a>02117   }
<a name="l02127"></a>02127   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, <span class="comment">// NOLINT</span>
<a name="l02128"></a>02128     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>) {
<a name="l02129"></a>02129     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(&amp;dirFile, path, oflag);
<a name="l02130"></a>02130   }
<a name="l02137"></a>02137   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>) {  <span class="comment">// NOLINT</span>
<a name="l02138"></a>02138     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(dirFile, path, O_RDWR);
<a name="l02139"></a>02139   }
<a name="l02149"></a>02149   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, uint16_t <a class="code" href="class_sd_base_file.html#a7e1f783bbc6758254c17c5d46122e830">index</a>, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>) {  <span class="comment">// NOLINT</span>
<a name="l02150"></a>02150     <span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(&amp;dirFile, index, oflag);
<a name="l02151"></a>02151   }
<a name="l02156"></a>02156   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a2e90ca886ca5681df690eeb646758aa5">openRoot</a>(<a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>&amp; <a class="code" href="class_sd_fat.html#a20e558523fde8b36ef1085018c270e0a">vol</a>) {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#a2e90ca886ca5681df690eeb646758aa5">openRoot</a>(&amp;vol);}  <span class="comment">// NOLINT</span>
<a name="l02161"></a>02161 <span class="comment"></span>  int8_t <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir) {<span class="keywordflow">return</span> <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(&amp;dir);}  <span class="comment">// NOLINT</span>
<a name="l02168"></a>02168 <span class="comment"></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>) {  <span class="comment">// NOLINT</span>
<a name="l02169"></a>02169     <span class="keywordflow">return</span> <span class="keyword">remove</span>(&amp;dirFile, <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>);
<a name="l02170"></a>02170   }
<a name="l02171"></a>02171 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02172"></a>02172 <span class="comment">// rest are private</span>
<a name="l02173"></a>02173  <span class="keyword">private</span>:
<a name="l02174"></a>02174   <span class="keyword">static</span> void (*oldDateTime_)(uint16_t&amp; date, uint16_t&amp; <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>);  <span class="comment">// NOLINT</span>
<a name="l02175"></a>02175   <span class="keyword">static</span> <span class="keywordtype">void</span> oldToNew(uint16_t* date, uint16_t* <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>) {
<a name="l02176"></a>02176     uint16_t d;
<a name="l02177"></a>02177     uint16_t t;
<a name="l02178"></a>02178     oldDateTime_(d, t);
<a name="l02179"></a>02179     *date = d;
<a name="l02180"></a>02180     *time = t;
<a name="l02181"></a>02181   }
<a name="l02182"></a>02182 <span class="preprocessor">#elif !defined(DOXYGEN)  // ALLOW_DEPRECATED_FUNCTIONS</span>
<a name="l02183"></a>02183 <span class="preprocessor"></span> <span class="keyword">public</span>:
<a name="l02184"></a>02184   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a1934f84b25a170fbdfbee1f874c7a315">contiguousRange</a>(uint32_t&amp; bgnBlock, uint32_t&amp; <a class="code" href="class_sd_base_file.html#a59ccb0407e4759a5363d4262e18aec73">endBlock</a>)  <span class="comment">// NOLINT</span>
<a name="l02185"></a><a class="code" href="class_sd_base_file.html#a59ccb0407e4759a5363d4262e18aec73">02185</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a1934f84b25a170fbdfbee1f874c7a315">contiguousRange</a>(&amp;bgnBlock, &amp;endBlock)&quot;)));
<a name="l02186"></a>02186   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#aa541db9563ce4a0b765b11b10f76b449">createContiguous</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile,  <span class="comment">// NOLINT</span>
<a name="l02187"></a>02187     const <span class="keywordtype">char</span>* <a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">path</a>, uint32_t size)
<a name="l02188"></a>02188     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#aa541db9563ce4a0b765b11b10f76b449">createContiguous</a>(&amp;bgnBlock, &amp;endBlock)&quot;)));
<a name="l02189"></a>02189   static <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ae89cdf7331e346cc8b7ce4a935c5b3e5">dateTimeCallback</a>(  <span class="comment">// NOLINT</span>
<a name="l02190"></a>02190     <span class="keywordtype">void</span> (*dateTime)(uint16_t&amp; date, uint16_t&amp; <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>))  <span class="comment">// NOLINT</span>
<a name="l02191"></a>02191     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <span class="keywordtype">void</span> <a class="code" href="class_sd_base_file.html#ae89cdf7331e346cc8b7ce4a935c5b3e5">dateTimeCallback</a>(&quot;
<a name="l02192"></a><a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">02192</a>      &quot;<span class="keywordtype">void</span> (*dateTime)(uint16_t* date, uint16_t* <a class="code" href="class_sd_base_file.html#affcf6be1d8a276e78f7a669c22fee4e6">time</a>))&quot;)));
<a name="l02193"></a>02193   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a5a55859ea4ca96697df8852acb2e76d1">dirEntry</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir)  <span class="comment">// NOLINT</span>
<a name="l02194"></a>02194     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a5a55859ea4ca96697df8852acb2e76d1">dirEntry</a>(&amp;dir)&quot;)));
<a name="l02195"></a>02195   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dir, const <span class="keywordtype">char</span>* path)  <span class="comment">// NOLINT</span>
<a name="l02196"></a><a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">02196</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a204a0b140efe0da51252fab0fd3bddcc">mkdir</a>(&amp;dir, path)&quot;)));
<a name="l02197"></a>02197   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, <span class="comment">// NOLINT</span>
<a name="l02198"></a>02198     const <span class="keywordtype">char</span>* path, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>)
<a name="l02199"></a><a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">02199</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(&amp;dirFile, path, <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>)&quot;)));
<a name="l02200"></a>02200   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, const <span class="keywordtype">char</span>* path)  <span class="comment">// NOLINT</span>
<a name="l02201"></a><a class="code" href="class_sd_base_file.html#a49c49194ba38e12c0991dfb65cf4876a">02201</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(&amp;dirFile, path, O_RDWR)&quot;)));
<a name="l02202"></a>02202   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, uint16_t <a class="code" href="class_sd_base_file.html#a7e1f783bbc6758254c17c5d46122e830">index</a>, uint8_t oflag) <span class="comment">// NOLINT</span>
<a name="l02203"></a><a class="code" href="class_sd_base_file.html#a7e1f783bbc6758254c17c5d46122e830">02203</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a52c7074d47cf3798184d1fbaa7d2711a">open</a>(&amp;dirFile, index, oflag)&quot;)));
<a name="l02204"></a>02204   <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a2e90ca886ca5681df690eeb646758aa5">openRoot</a>(<a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>&amp; <a class="code" href="class_sd_fat.html#a20e558523fde8b36ef1085018c270e0a">vol</a>)  <span class="comment">// NOLINT</span>
<a name="l02205"></a>02205     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a2e90ca886ca5681df690eeb646758aa5">openRoot</a>(&amp;<a class="code" href="class_sd_fat.html#a20e558523fde8b36ef1085018c270e0a">vol</a>)&quot;)));
<a name="l02206"></a>02206   int8_t <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(<a class="code" href="structdirectory_entry.html" title="FAT short directory entry.">dir_t</a>&amp; dir)  <span class="comment">// NOLINT</span>
<a name="l02207"></a>02207     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#aa905d6674b7a318e6f75a7f5bfd252fa">readDir</a>(&amp;dir)&quot;)));
<a name="l02208"></a>02208   static <span class="keywordtype">bool</span> <a class="code" href="class_sd_base_file.html#a1f9c4a4bd47b7cd9beb431504c5ae46c">remove</a>(<a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>&amp; dirFile, const <span class="keywordtype">char</span>* path)  <span class="comment">// NOLINT</span>
<a name="l02209"></a><a class="code" href="class_sd_base_file.html#a55cf894a3c789d80a963f10433251dfe">02209</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use <a class="code" href="class_sd_base_file.html#a1f9c4a4bd47b7cd9beb431504c5ae46c">remove</a>(&amp;dirFile, path)&quot;)));
<a name="l02210"></a>02210 <span class="preprocessor">#endif  // ALLOW_DEPRECATED_FUNCTIONS</span>
<a name="l02211"></a>02211 <span class="preprocessor"></span>};
<a name="l02212"></a>02212 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02217"></a><a class="code" href="class_sd_file.html">02217</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sd_file.html" title="SdBaseFile with Print.">SdFile</a> : <span class="keyword">public</span> <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> {
<a name="l02218"></a>02218  <span class="keyword">public</span>:
<a name="l02219"></a><a class="code" href="class_sd_file.html#ad1f46fedf64b4195535e53cb31cc6974">02219</a>   <a class="code" href="class_sd_file.html#ad1f46fedf64b4195535e53cb31cc6974">SdFile</a>() {}
<a name="l02220"></a>02220   <a class="code" href="class_sd_file.html#ad1f46fedf64b4195535e53cb31cc6974">SdFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name, uint8_t <a class="code" href="class_sd_base_file.html#a2319f1b18c7dcb22957b3f75f6436299">oflag</a>);
<a name="l02221"></a>02221 <span class="preprocessor">#if DESTRUCTOR_CLOSES_FILE</span>
<a name="l02222"></a>02222 <span class="preprocessor"></span>  ~<a class="code" href="class_sd_file.html" title="SdBaseFile with Print.">SdFile</a>() {}
<a name="l02223"></a>02223 <span class="preprocessor">#endif  // DESTRUCTOR_CLOSES_FILE</span>
<a name="l02224"></a>02224 <span class="preprocessor"></span>
<a name="l02225"></a><a class="code" href="class_sd_file.html#a9b199fded04cffe6a609465dce43fdcc">02225</a>   <span class="keywordtype">bool</span> <a class="code" href="class_sd_file.html#a9b199fded04cffe6a609465dce43fdcc">getWriteError</a>() {<span class="keywordflow">return</span> <a class="code" href="class_sd_file.html#a9b199fded04cffe6a609465dce43fdcc">SdBaseFile::getWriteError</a>();}
<a name="l02227"></a><a class="code" href="class_sd_file.html#af50f0c1e1c726ef3dee08a84456090b9">02227</a>   <span class="keywordtype">void</span> <a class="code" href="class_sd_file.html#af50f0c1e1c726ef3dee08a84456090b9">clearWriteError</a>() {<a class="code" href="class_sd_file.html#af50f0c1e1c726ef3dee08a84456090b9">SdBaseFile::clearWriteError</a>();}
<a name="l02228"></a>02228 <span class="preprocessor">#ifdef COMPAT_PRE1</span>
<a name="l02229"></a>02229 <span class="preprocessor"></span>  <span class="keywordtype">void</span> <a class="code" href="class_sd_file.html#ac82b138293686567ab5dfbe3ba1fa1ee">write</a>(uint8_t b);
<a name="l02230"></a>02230 <span class="preprocessor">#else</span>
<a name="l02231"></a>02231 <span class="preprocessor"></span>  <span class="keywordtype">size_t</span> <a class="code" href="class_sd_file.html#ac82b138293686567ab5dfbe3ba1fa1ee">write</a>(uint8_t b);
<a name="l02232"></a>02232 <span class="preprocessor">#endif</span>
<a name="l02233"></a>02233 <span class="preprocessor"></span>  <span class="keywordtype">int</span> <a class="code" href="class_sd_file.html#ac82b138293686567ab5dfbe3ba1fa1ee">write</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* str);
<a name="l02234"></a>02234   <span class="keywordtype">int</span> <a class="code" href="class_sd_file.html#ac82b138293686567ab5dfbe3ba1fa1ee">write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* buf, <span class="keywordtype">size_t</span> nbyte);
<a name="l02235"></a>02235   <span class="keywordtype">void</span> <a class="code" href="class_sd_file.html#a125d7f01d9c471f0f45266bc5f1fdef8">write_P</a>(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(str));
<a name="l02236"></a>02236   <span class="keywordtype">void</span> <a class="code" href="class_sd_file.html#a355726bfcd0db6fe83cb4516f6c4f124">writeln_P</a>(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(str));
<a name="l02237"></a>02237 };
<a name="l02239"></a><a class="code" href="_sd_fat_8h.html#a6d413885c384693a5c98de870c752ac5">02239</a> <span class="preprocessor">#define PgmPrint(x) SerialPrint_P(PSTR(x))</span>
<a name="l02240"></a>02240 <span class="preprocessor"></span>
<a name="l02241"></a><a class="code" href="_sd_fat_8h.html#a3b0de03c1185b3235b3c1e8a80ef281f">02241</a> <span class="preprocessor">#define PgmPrintln(x) SerialPrintln_P(PSTR(x))</span>
<a name="l02242"></a>02242 <span class="preprocessor"></span>
<a name="l02243"></a><a class="code" href="namespace_sd_fat_util.html">02243</a> <span class="keyword">namespace </span>SdFatUtil {
<a name="l02244"></a>02244   <span class="keywordtype">int</span> <a class="code" href="namespace_sd_fat_util.html#a9103b9a4934cfc4d5dea9e7fec7353d1">FreeRam</a>();
<a name="l02245"></a>02245   <span class="keywordtype">void</span> <a class="code" href="namespace_sd_fat_util.html#a53501f750724a30711199f13157368b0">SerialPrint_P</a>(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(str));
<a name="l02246"></a>02246   <span class="keywordtype">void</span> <a class="code" href="namespace_sd_fat_util.html#ac5a07ab8c6efe1f2e2a635cfb395a8c3">SerialPrintln_P</a>(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(str));
<a name="l02247"></a>02247 }
<a name="l02248"></a>02248 
<a name="l02249"></a>02249 <span class="keyword">using namespace </span>SdFatUtil;  <span class="comment">// NOLINT</span>
<a name="l02250"></a>02250 
<a name="l02251"></a>02251 <span class="comment">//#include &lt;SdStream.h&gt;</span>
<a name="l02252"></a>02252 <span class="comment">//#include &lt;ArduinoStream.h&gt;</span>
<a name="l02253"></a>02253 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l02258"></a><a class="code" href="class_sd_fat.html">02258</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sd_fat.html" title="Integration class for the SdFat library.">SdFat</a> {
<a name="l02259"></a>02259  <span class="keyword">public</span>:
<a name="l02260"></a><a class="code" href="class_sd_fat.html#aae557bf2fc77ba0b45b20727ff28667e">02260</a>   <a class="code" href="class_sd_fat.html#aae557bf2fc77ba0b45b20727ff28667e">SdFat</a>() {}
<a name="l02261"></a>02261 <span class="preprocessor">#if ALLOW_DEPRECATED_FUNCTIONS &amp;&amp; !defined(DOXYGEN)</span>
<a name="l02262"></a>02262 <span class="preprocessor"></span>
<a name="l02274"></a>02274   <span class="keywordtype">bool</span> init(uint8_t sckRateID = SPI_FULL_SPEED,
<a name="l02275"></a>02275     uint8_t chipSelectPin = SD_CHIP_SELECT_PIN) {
<a name="l02276"></a>02276     <span class="keywordflow">return</span> begin(chipSelectPin, sckRateID);
<a name="l02277"></a>02277   }
<a name="l02278"></a>02278 <span class="preprocessor">#elif  !defined(DOXYGEN)  // ALLOW_DEPRECATED_FUNCTIONS</span>
<a name="l02279"></a>02279 <span class="preprocessor"></span>  <span class="keywordtype">bool</span> init() <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use sd.begin()&quot;)));
<a name="l02280"></a>02280   <span class="keywordtype">bool</span> init(uint8_t sckRateID)
<a name="l02281"></a><a class="code" href="class_sd_fat.html#ae74a8b9d0caedc18a0cecda1c99e4a4c">02281</a>     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use sd.begin(chipSelect, sckRate)&quot;)));
<a name="l02282"></a>02282   <span class="keywordtype">bool</span> init(uint8_t sckRateID, uint8_t chipSelectPin)
<a name="l02283"></a>02283     <a class="code" href="_sd_fat_8h.html#a011d27aa1579ba8c8866dbfc61d0f47b">__attribute__</a>((error(&quot;use sd.begin(chipSelect, sckRate)&quot;)));
<a name="l02284"></a>02284 <span class="preprocessor">#endif  // ALLOW_DEPRECATED_FUNCTIONS</span>
<a name="l02285"></a>02285 <span class="preprocessor"></span>
<a name="l02286"></a><a class="code" href="class_sd_fat.html#aef4142d94f7839ca995258104689cb49">02286</a>   <a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a>* <a class="code" href="class_sd_fat.html#aef4142d94f7839ca995258104689cb49">card</a>() {<span class="keywordflow">return</span> &amp;card_;}
<a name="l02287"></a>02287   <span class="keywordtype">bool</span> chdir(<span class="keywordtype">bool</span> set_cwd = <span class="keyword">false</span>);
<a name="l02288"></a>02288   <span class="keywordtype">bool</span> chdir(<span class="keyword">const</span> <span class="keywordtype">char</span>* path, <span class="keywordtype">bool</span> set_cwd = <span class="keyword">false</span>);
<a name="l02289"></a>02289   <span class="keywordtype">void</span> chvol();
<a name="l02290"></a>02290   <span class="keywordtype">void</span> errorHalt();
<a name="l02291"></a>02291   <span class="keywordtype">void</span> errorHalt_P(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(msg));
<a name="l02292"></a>02292   <span class="keywordtype">void</span> errorHalt(<span class="keywordtype">char</span> <span class="keyword">const</span> *msg);
<a name="l02293"></a>02293   <span class="keywordtype">void</span> errorPrint();
<a name="l02294"></a>02294   <span class="keywordtype">void</span> errorPrint_P(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(msg));
<a name="l02295"></a>02295   <span class="keywordtype">void</span> errorPrint(<span class="keywordtype">char</span> <span class="keyword">const</span> *msg);
<a name="l02296"></a>02296   <span class="keywordtype">bool</span> exists(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);
<a name="l02297"></a>02297   <span class="keywordtype">bool</span> begin(uint8_t chipSelectPin = SD_CHIP_SELECT_PIN,
<a name="l02298"></a>02298     uint8_t sckRateID = SPI_FULL_SPEED);
<a name="l02299"></a>02299   <span class="keywordtype">void</span> initErrorHalt();
<a name="l02300"></a>02300   <span class="keywordtype">void</span> initErrorHalt(<span class="keywordtype">char</span> <span class="keyword">const</span> *msg);
<a name="l02301"></a>02301   <span class="keywordtype">void</span> initErrorHalt_P(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(msg));
<a name="l02302"></a>02302   <span class="keywordtype">void</span> initErrorPrint();
<a name="l02303"></a>02303   <span class="keywordtype">void</span> initErrorPrint(<span class="keywordtype">char</span> <span class="keyword">const</span> *msg);
<a name="l02304"></a>02304   <span class="keywordtype">void</span> initErrorPrint_P(<a class="code" href="_h_a_l_8h.html#a6c7567c1812b6b6ca9067377476ddc4e">FSTRINGPARAM</a>(msg));
<a name="l02305"></a>02305   <span class="keywordtype">void</span> ls(uint8_t flags = 0);
<a name="l02306"></a>02306   <span class="keywordtype">bool</span> mkdir(<span class="keyword">const</span> <span class="keywordtype">char</span>* path, <span class="keywordtype">bool</span> pFlag = <span class="keyword">true</span>);
<a name="l02307"></a>02307   <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<span class="keyword">const</span> <span class="keywordtype">char</span>* path);
<a name="l02308"></a>02308   <span class="keywordtype">bool</span> rename(<span class="keyword">const</span> <span class="keywordtype">char</span> *oldPath, <span class="keyword">const</span> <span class="keywordtype">char</span> *newPath);
<a name="l02309"></a>02309   <span class="keywordtype">bool</span> rmdir(<span class="keyword">const</span> <span class="keywordtype">char</span>* path);
<a name="l02310"></a>02310   <span class="keywordtype">bool</span> truncate(<span class="keyword">const</span> <span class="keywordtype">char</span>* path, uint32_t length);
<a name="l02312"></a><a class="code" href="class_sd_fat.html#a20e558523fde8b36ef1085018c270e0a">02312</a>   <a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a>* <a class="code" href="class_sd_fat.html#a20e558523fde8b36ef1085018c270e0a">vol</a>() {<span class="keywordflow">return</span> &amp;vol_;}
<a name="l02314"></a><a class="code" href="class_sd_fat.html#ad8a32a2789b135cc0fafc9964cfb2d31">02314</a>   <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a>* <a class="code" href="class_sd_fat.html#ad8a32a2789b135cc0fafc9964cfb2d31">vwd</a>() {<span class="keywordflow">return</span> &amp;vwd_;}
<a name="l02315"></a>02315   <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l02316"></a>02316   <span class="comment">// static functions for stdOut</span>
<a name="l02317"></a>02317 
<a name="l02318"></a>02318  <span class="keyword">private</span>:
<a name="l02319"></a><a class="code" href="class_sd_fat.html#a1b169bdfeb406ef2e6fb77bb1c06ce26">02319</a>   <a class="code" href="class_sd2_card.html" title="Raw access to SD and SDHC flash memory cards.">Sd2Card</a> <a class="code" href="class_sd_fat.html#a1b169bdfeb406ef2e6fb77bb1c06ce26">card_</a>;
<a name="l02320"></a><a class="code" href="class_sd_fat.html#aa76bab2a76aa11b7fa39d963a1782130">02320</a>   <a class="code" href="class_sd_volume.html" title="Access FAT16 and FAT32 volumes on SD and SDHC cards.">SdVolume</a> <a class="code" href="class_sd_fat.html#aa76bab2a76aa11b7fa39d963a1782130">vol_</a>;
<a name="l02321"></a><a class="code" href="class_sd_fat.html#a72ad0dde47cbd5a6aeb6786955148736">02321</a>   <a class="code" href="class_sd_base_file.html" title="Base class for SdFile with Print and C++ streams.">SdBaseFile</a> <a class="code" href="class_sd_fat.html#a72ad0dde47cbd5a6aeb6786955148736">vwd_</a>;
<a name="l02322"></a>02322 };
<a name="l02323"></a>02323 <span class="preprocessor">#endif  // SdFat_h</span>
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_sd_fat_8h.html">SdFat.h</a>      </li>

    <li class="footer">Generated on Mon Dec 30 2013 18:53:02 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
